xunge/DecIR huggingface dataset:
void clientsArePaused(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               51, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<clientsArePaused>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x33,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clientsArePaused>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x33,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.clientsArePaused = [17 x i8] c"clientsArePaused\00"
define void @clientsArePaused() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 51, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.clientsArePaused, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.clientsArePaused = [17 x i8] c"clientsArePaused\00"
define void @clientsArePaused() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 51, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.clientsArePaused, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int rc_i2c_read_bytes(int, int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int rc_i2c_read_byte(int bus, uint8_t regAddr, uint8_t *data) {
  return rc_i2c_read_bytes(bus, regAddr, 1, data);
}


x86 assembly (clang, -O0):
<rc_i2c_read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
call   1030 <rc_i2c_read_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_i2c_read_byte>:
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <rc_i2c_read_bytes@plt>

LLVM IR (-O0):
define i32 @rc_i2c_read_byte(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @rc_i2c_read_bytes(i32 %7, i32 %8, i32 1, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @rc_i2c_read_byte(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @rc_i2c_read_bytes(i32 %0, i32 %1, i32 1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void die(const char *msg) {
  fputs("hex2float: FATAL: ", stderr);
  fputs(msg, stderr);
  fputs("\n", stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xeb0(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
mov    (%r14),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"hex2float: FATAL: \00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"hex2float: FATAL: \00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int num;
  printf("\nInput the number:");
  scanf("%d", &num);
  printf("RESULT:%d\n\n", invert(num, 2, 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <invert@plt>
mov    %eax,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <invert@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0AInput the number:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"RESULT:%d\0A\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @invert(i32 %4, i32 2, i32 3)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"\0AInput the number:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [12 x i8] c"RESULT:%d\0A\0A\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @invert(i32 %5, i32 2, i32 3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret void
}
int test_imm_49int64_lowword_mem(long long *val) {
  return ((*val) & (0x49 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_49int64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x49,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_49int64_lowword_mem>:
testb  $0x49,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_49int64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 73
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_49int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 73
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double genrand_real2();
int rand_int(int max_num, int min_num) {
  double r = genrand_real2();
  return (int)(min_num + r * (max_num - min_num));
}


x86 assembly (clang, -O0):
<rand_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <genrand_real2@plt>
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <genrand_real2@plt>
cvtsi2sd %ebx,%xmm1
sub    %ebx,%ebp
cvtsi2sd %ebp,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
cvttsd2si %xmm2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call double (...) @genrand_real2()
store double %6, double* %5
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = load double, double* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %9, double %13, double %8)
%15 = fptosi double %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @rand_int(i32 %0, i32 %1) {
%3 = tail call double (...) @genrand_real2()
%4 = sitofp i32 %1 to double
%5 = sub nsw i32 %0, %1
%6 = sitofp i32 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %3, double %6, double %4)
%8 = fptosi double %7 to i32
ret i32 %8
}
unsigned long delta_hash(const void *msg) {
  const char *s = msg;
  unsigned long hash = 5381;
  int c;
  while ((c = *s++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<delta_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1152 <delta_hash+0x52>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <delta_hash+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <delta_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <delta_hash+0x10>
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i64 @delta_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
store i8* %6, i8** %3
store i64 5381, i64* %4
br label %7
7: ; preds = %13, %1
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
store i32 %11, i32* %5
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %7
%14 = load i64, i64* %4
%15 = shl i64 %14, 5
%16 = load i64, i64* %4
%17 = add i64 %15, %16
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = add i64 %17, %19
store i64 %20, i64* %4
br label %7
21: ; preds = %7
%22 = load i64, i64* %4
ret i64 %22
}

LLVM IR (-O2):
define i64 @delta_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
double stb_randLCG();
double stb_frandLCG(void) {
  return stb_randLCG() / ((double)(1 << 16) * (1 << 16));
}


x86 assembly (clang, -O0):
<stb_frandLCG>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <stb_randLCG@plt>
movsd  0xedd(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_frandLCG>:
push   %rax
xor    %eax,%eax
call   1030 <stb_randLCG@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @stb_frandLCG() {
%1 = call double (...) @stb_randLCG()
%2 = fdiv double %1, 0x41F0000000000000
ret double %2
}

LLVM IR (-O2):
define double @stb_frandLCG() {
%1 = tail call double (...) @stb_randLCG()
%2 = fmul double %1, 0x3DF0000000000000
ret double %2
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRD1_get(void) { return U_WMRCORENONE_get("U_WMRD1"); }


x86 assembly (clang, -O0):
<U_WMRD1_get>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_get@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRD1_get>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_get@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRD1\00"
define i32 @U_WMRD1_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD1\00"
define i32 @U_WMRD1_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_SET_BIT(int, int);
void xburst_cgm_gate_uart4() { MIPS_SET_BIT((0xB0000000 + 0x28), 10); }


x86 assembly (clang, -O0):
<xburst_cgm_gate_uart4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0xa,%esi
call   1030 <MIPS_SET_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_gate_uart4>:
mov    $0xb0000028,%edi
mov    $0xa,%esi
jmp    1030 <MIPS_SET_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_gate_uart4() {
%1 = call i32 @MIPS_SET_BIT(i32 -1342177240, i32 10)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_gate_uart4() {
%1 = tail call i32 @MIPS_SET_BIT(i32 -1342177240, i32 10)
ret void
}
/* Variables and functions */
unsigned long gfx_ind(int);
int /*<<< orphan*/ gfx_outd(int, unsigned long);
void Dorado9211SetClock(void) {
  unsigned long value;
  value = gfx_ind(0x6400 + 0x04);
  gfx_outd(0x6400 + 0x00, value | 0x00000080);
}


x86 assembly (clang, -O0):
<Dorado9211SetClock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6404,%edi
call   1040 <gfx_ind@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
or     $0x80,%rsi
mov    $0x6400,%edi
call   1030 <gfx_outd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dorado9211SetClock>:
push   %rax
mov    $0x6404,%edi
call   1040 <gfx_ind@plt>
or     $0x80,%rax
mov    $0x6400,%edi
mov    %rax,%rsi
pop    %rax
jmp    1030 <gfx_outd@plt>

LLVM IR (-O0):
define void @Dorado9211SetClock() {
%1 = alloca i64
%2 = call i64 @gfx_ind(i32 25604)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = or i64 %3, 128
%5 = call i32 @gfx_outd(i32 25600, i64 %4)
ret void
}

LLVM IR (-O2):
define void @Dorado9211SetClock() {
%1 = tail call i64 @gfx_ind(i32 25604)
%2 = or i64 %1, 128
%3 = tail call i32 @gfx_outd(i32 25600, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int gen_SEGV() {
  kill(getpid(), SIGSEGV);
  return 0;
}


x86 assembly (clang, -O0):
<gen_SEGV>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_SEGV>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGSEGV = global i32 0
define i32 @gen_SEGV() {
%1 = call i32 (...) @getpid()
%2 = load i32, i32* @SIGSEGV
%3 = call i32 @kill(i32 %1, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@SIGSEGV = global i32 0
define i32 @gen_SEGV() {
%1 = tail call i32 (...) @getpid()
%2 = load i32, i32* @SIGSEGV
%3 = tail call i32 @kill(i32 %1, i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *_big_file_open_a_file(char const *, int, char *,
                                          int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int _big_file_path_is_block(const char *basename) {
  FILE *fheader = _big_file_open_a_file(basename, -1, "r", 0);
  if (fheader == NULL) {
    return 0;
  }
  fclose(fheader);
  return 1;
}


x86 assembly (clang, -O0):
<_big_file_path_is_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xffffffff,%esi
lea    0xec4(%rip),%rdx
xor    %ecx,%ecx
call   1040 <_big_file_open_a_file@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115e <_big_file_path_is_block+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    116e <_big_file_path_is_block+0x4e>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_big_file_path_is_block>:
push   %rbx
lea    0xed8(%rip),%rdx
xor    %ebx,%ebx
mov    $0xffffffff,%esi
xor    %ecx,%ecx
call   1040 <_big_file_open_a_file@plt>
test   %rax,%rax
je     1148 <_big_file_path_is_block+0x28>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @_big_file_path_is_block(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @_big_file_open_a_file(i8* %5, i32 -1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0)
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
store i32 1, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @_big_file_path_is_block(i8* %0) {
%2 = tail call i32* @_big_file_open_a_file(i8* %0, i32 -1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
int /*<<< orphan*/ LC_CTYPE;
char *setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ wprintf(char *, char *);
int main(int argc, char *argv[]) {
  char *locale = setlocale(LC_CTYPE, "zh_CN.UTF-8");
  wchar_t *wcstr = L"北京您好";
  wprintf(L"wide char string:%ls\n", wcstr);
  void printc();
  printc();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
call   1050 <setlocale@plt>
mov    %rax,-0x18(%rbp)
lea    0xea6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <wprintf@plt>
mov    $0x0,%al
call   1030 <printc@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1050 <setlocale@plt>
lea    0xed3(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1040 <wprintf@plt>
xor    %eax,%eax
call   1030 <printc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_CTYPE = global i32 0
@.str = [12 x i8] c"zh_CN.UTF-8\00"
@.str.1 = [5 x i32] [i32 21271, i32 20140, i32 24744, i32 22909, i32 0]
@.str.2 = [22 x i32] [i32 119, i32 105, i32 100, i32 101, i32 32, i32 99, i32 104, i32 97, i32 114, i32 32, i32 115, i32 116, i32 114, i32 105, i32 110, i32 103, i32 58, i32 37, i32 108, i32 115, i32 10, i32 0]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* @LC_CTYPE
%9 = call i8* @setlocale(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %6
store i8* bitcast ([5 x i32]* @.str.1 to i8*), i8** %7
%10 = load i8*, i8** %7
%11 = call i32 @wprintf(i8* bitcast ([22 x i32]* @.str.2 to i8*), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@LC_CTYPE = global i32 0
@.str = [12 x i8] c"zh_CN.UTF-8\00"
@.str.1 = [5 x i32] [i32 21271, i32 20140, i32 24744, i32 22909, i32 0]
@.str.2 = [22 x i32] [i32 119, i32 105, i32 100, i32 101, i32 32, i32 99, i32 104, i32 97, i32 114, i32 32, i32 115, i32 116, i32 114, i32 105, i32 110, i32 103, i32 58, i32 37, i32 108, i32 115, i32 10, i32 0]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @LC_CTYPE
%4 = tail call i8* @setlocale(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @wprintf(i8* bitcast ([22 x i32]* @.str.2 to i8*), i8* bitcast ([5 x i32]* @.str.1 to i8*))
tail call void (...) @printc()
ret i32 0
}
/* Variables and functions */
int foo(int);
int bar(int i) { return 1 + foo(i); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <foo@plt>
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
call   1030 <foo@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @foo(i32 %3)
%5 = add nsw i32 1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 @foo(i32 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_ttou(int sig) { printf("TTOU\n"); }


x86 assembly (clang, -O0):
<catch_ttou>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catch_ttou>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"TTOU\0A\00"
define void @catch_ttou(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"TTOU\00"
define void @catch_ttou(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printResultsINT(int result) {
  printf("\n");
  printf("%i", result);
  printf("\n");
}


x86 assembly (clang, -O0):
<printResultsINT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printResultsINT>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"%i\00"
define void @printResultsINT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
define void @printResultsINT(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct String {
  int dummy;
};

/* Variables and functions */
unsigned long string_hash_code(struct String *);
unsigned long string_hash_code_vv(void *s) {
  return string_hash_code((struct String *)s);
}


x86 assembly (clang, -O0):
<string_hash_code_vv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <string_hash_code@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash_code_vv>:
jmp    1030 <string_hash_code@plt>

LLVM IR (-O0):
%struct.String = type { i32 }
define i64 @string_hash_code_vv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.String*
%5 = call i64 @string_hash_code(%struct.String* %4)
ret i64 %5
}

LLVM IR (-O2):
%struct.String = type { i32 }
define i64 @string_hash_code_vv(i8* %0) {
%2 = bitcast i8* %0 to %struct.String*
%3 = tail call i64 @string_hash_code(%struct.String* %2)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ fromRep16(int);
uint16_t makeInf16(void) { return fromRep16(0x7c00U); }


x86 assembly (clang, -O0):
<makeInf16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c00,%edi
call   1030 <fromRep16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeInf16>:
mov    $0x7c00,%edi
jmp    1030 <fromRep16@plt>

LLVM IR (-O0):
define i32 @makeInf16() {
%1 = call i32 @fromRep16(i32 31744)
ret i32 %1
}

LLVM IR (-O2):
define i32 @makeInf16() {
%1 = tail call i32 @fromRep16(i32 31744)
ret i32 %1
}
unsigned long int next_prime(seed)
unsigned long int seed;
{
  seed |= 1;
  while (!is_prime(seed))
    seed += 2;
  return seed;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1148 <next_prime+0x38>
jmp    1159 <next_prime+0x49>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <next_prime+0x18>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
mov    %rdi,%rbx
or     $0x1,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <is_prime@plt>
add    $0x2,%rbx
test   %eax,%eax
je     1120 <next_prime+0x10>
add    $0xfffffffffffffffe,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @next_prime(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 %3, 1
store i64 %4, i64* %2
br label %5
5: ; preds = %10, %1
%6 = load i64, i64* %2
%7 = call i32 (i64, ...) bitcast (i32 (...)* @is_prime to i32 (i64, ...)*)(i64 %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i64, i64* %2
%12 = add i64 %11, 2
store i64 %12, i64* %2
br label %5
13: ; preds = %5
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
define i64 @next_prime(i64 %0) {
%2 = or i64 %0, 1
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %2, %1 ], [ %7, %3 ]
%5 = tail call i32 (i64, ...) bitcast (i32 (...)* @is_prime to i32 (i64, ...)*)(i64 %4)
%6 = icmp eq i32 %5, 0
%7 = add i64 %4, 2
br i1 %6, label %3, label %8
8: ; preds = %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ dmaCompleteUsbCh1In();
void INT_D1FIFO1_COMPLETE(void) { dmaCompleteUsbCh1In(); }


x86 assembly (clang, -O0):
<INT_D1FIFO1_COMPLETE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dmaCompleteUsbCh1In@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<INT_D1FIFO1_COMPLETE>:
xor    %eax,%eax
jmp    1030 <dmaCompleteUsbCh1In@plt>

LLVM IR (-O0):
define void @INT_D1FIFO1_COMPLETE() {
%1 = call i32 (...) @dmaCompleteUsbCh1In()
ret void
}

LLVM IR (-O2):
define void @INT_D1FIFO1_COMPLETE() {
%1 = tail call i32 (...) @dmaCompleteUsbCh1In()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ f0(int /*<<< orphan*/ **);
void f3(long unsigned int a, long unsigned int b) {
  if (a <= 5 && b <= 3) {
    uint32_t x[a][b];
    f0(x);
  }
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x5,-0x8(%rbp)
ja     1175 <f3+0x65>
cmpq   $0x3,-0x10(%rbp)
ja     1175 <f3+0x65>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rdi
sub    %rdx,%rdi
mov    %rdi,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
call   1030 <f0@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
cmp    $0x5,%rdi
ja     114c <f3+0x3c>
cmp    $0x3,%rsi
ja     114c <f3+0x3c>
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rsp,%rbx
imul   %rdi,%rsi
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,%rsp
call   1030 <f0@plt>
mov    %rbx,%rsp
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @f3(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = icmp ule i64 %8, 5
br i1 %9, label %10, label %22
10: ; preds = %2
%11 = load i64, i64* %4
%12 = icmp ule i64 %11, 3
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %5
%17 = mul nuw i64 %14, %15
%18 = alloca i32, i64 %17
store i64 %14, i64* %6
store i64 %15, i64* %7
%19 = bitcast i32* %18 to i32**
%20 = call i32 @f0(i32** %19)
%21 = load i8*, i8** %5
br label %22
22: ; preds = %13, %10, %2
ret void
}

LLVM IR (-O2):
define void @f3(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, 6
%4 = icmp ult i64 %1, 4
%5 = and i1 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = tail call i8* @llvm.stacksave()
%8 = mul nuw nsw i64 %1, %0
%9 = alloca i32, i64 %8
%10 = bitcast i32* %9 to i32**
%11 = call i32 @f0(i32** %10)
br label %12
12: ; preds = %6, %2
ret void
}
void cond_disabled() {}


x86 assembly (clang, -O0):
<cond_disabled>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cond_disabled>:
ret

LLVM IR (-O0):
define void @cond_disabled() {
ret void
}

LLVM IR (-O2):
define void @cond_disabled() {
ret void
}
/* Variables and functions */
char *format_object2(char const *, int /*<<< orphan*/ *, void const *,
                     char const *(*)(void const *, char const *));
char *format_object(const char *format, const void *object,
                    const char *(*getter)(const void *object,
                                          const char *name)) {
  return format_object2(format, NULL, object, getter);
}


x86 assembly (clang, -O0):
<format_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <format_object2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_object>:
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <format_object2@plt>

LLVM IR (-O0):
define i8* @format_object(i8* %0, i8* %1, i8* (i8*, i8*)* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8* (i8*, i8*)*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* (i8*, i8*)* %2, i8* (i8*, i8*)** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8* (i8*, i8*)*, i8* (i8*, i8*)** %6
%10 = call i8* @format_object2(i8* %7, i32* null, i8* %8, i8* (i8*, i8*)* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @format_object(i8* %0, i8* %1, i8* (i8*, i8*)* %2) {
%4 = tail call i8* @format_object2(i8* %0, i32* null, i8* %1, i8* (i8*, i8*)* %2)
ret i8* %4
}
void foo705(int p) {}


x86 assembly (clang, -O0):
<foo705>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo705>:
ret

LLVM IR (-O0):
define void @foo705(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo705(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Jump(char *label) { Inst_Printf("jmp", "%s", label); }


x86 assembly (clang, -O0):
<Jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee3(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"jmp\00"
@.str.1 = [3 x i8] c"%s\00"
define void @Jump(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"jmp\00"
@.str.1 = [3 x i8] c"%s\00"
define void @Jump(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isc40(unsigned char const);
int isX12(const unsigned char input) {
  if (isc40(input)) {
    return 1;
  }
  if (input == 13 || input == '*' || input == '>') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isX12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1030 <isc40@plt>
cmp    $0x0,%rax
je     113d <isX12+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1177 <isX12+0x67>
movzbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     1164 <isX12+0x54>
movzbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1164 <isX12+0x54>
movzbl -0x5(%rbp),%eax
cmp    $0x3e,%eax
jne    1170 <isX12+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1177 <isX12+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isX12>:
push   %rbx
mov    %edi,%ebx
call   1030 <isc40@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <isX12+0x17>
pop    %rbx
ret
cmp    $0x3e,%bl
ja     113f <isX12+0x2f>
movzbl %bl,%ecx
movabs $0x4000040000002000,%rdx
bt     %rcx,%rdx
jb     1125 <isX12+0x15>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isX12(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isc40(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %22
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 13
br i1 %11, label %20, label %12
12: ; preds = %8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 42
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 62
br i1 %19, label %20, label %21
20: ; preds = %16, %12, %8
store i32 1, i32* %2
br label %22
21: ; preds = %16
store i32 0, i32* %2
br label %22
22: ; preds = %21, %20, %7
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @isX12(i8 zeroext %0) {
%2 = tail call i64 @isc40(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
switch i8 %0, label %5 [
i8 62, label %6
i8 42, label %6
i8 13, label %6
]
5: ; preds = %4
br label %6
6: ; preds = %4, %4, %4, %1, %5
%7 = phi i32 [ 0, %5 ], [ 1, %1 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ]
ret i32 %7
}
int test_imm_38uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38uint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x38,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38uint64_lowword_mem>:
testb  $0x38,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_38uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 56
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_38uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 56
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int abs(int);
int Maior(int n1, int n2) {
  int maior;
  maior = (n1 + n2 + abs(n1 - n2)) / 2;
  return (maior);
}


x86 assembly (clang, -O0):
<Maior>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Maior>:
lea    (%rsi,%rdi,1),%eax
sub    %esi,%edi
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @Maior(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @abs(i32 %11)
%13 = add nsw i32 %8, %12
%14 = sdiv i32 %13, 2
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @Maior(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sub nsw i32 %0, %1
%5 = tail call i32 @llvm.abs.i32(i32 %4, i1 true)
%6 = add nsw i32 %3, %5
%7 = sdiv i32 %6, 2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ simexit(int /*<<< orphan*/);
int /*<<< orphan*/ simputs(char *);
int main() {
  simputs("Hello World\n");
  simexit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <simputs@plt>
xor    %edi,%edi
call   1040 <simexit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <simputs@plt>
xor    %edi,%edi
call   1040 <simexit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @simputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @simexit(i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main() {
%1 = tail call i32 @simputs(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @simexit(i32 0)
ret i32 0
}
/* Variables and functions */
int rm_fid(int);
int close_file(int fid) { return rm_fid(fid); }


x86 assembly (clang, -O0):
<close_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <rm_fid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_file>:
jmp    1030 <rm_fid@plt>

LLVM IR (-O0):
define i32 @close_file(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rm_fid(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @close_file(i32 %0) {
%2 = tail call i32 @rm_fid(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SetSysClockTo72();
void SetSysClock(void) { SetSysClockTo72(); }


x86 assembly (clang, -O0):
<SetSysClock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SetSysClockTo72@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetSysClock>:
xor    %eax,%eax
jmp    1030 <SetSysClockTo72@plt>

LLVM IR (-O0):
define void @SetSysClock() {
%1 = call i32 (...) @SetSysClockTo72()
ret void
}

LLVM IR (-O2):
define void @SetSysClock() {
%1 = tail call i32 (...) @SetSysClockTo72()
ret void
}
void release_segments(struct mm_struct *mm) {}


x86 assembly (clang, -O0):
<release_segments>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_segments>:
ret

LLVM IR (-O0):
%struct.mm_struct = type opaque
define void @release_segments(%struct.mm_struct* %0) {
%2 = alloca %struct.mm_struct*
store %struct.mm_struct* %0, %struct.mm_struct** %2
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @release_segments(%struct.mm_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _test_5(int *, int *, int *, int);
void soru_5() {
  int *ilk_elemanin_adresi = 0;
  int *son_elemanin_adresi = 0;
  int *ikinci_elemanin_adresi = 0;
  int boyut = 0;
  _test_5(ilk_elemanin_adresi, son_elemanin_adresi, ikinci_elemanin_adresi,
          boyut);
}


x86 assembly (clang, -O0):
<soru_5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <_test_5@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_5>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <_test_5@plt>

LLVM IR (-O0):
define void @soru_5() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
store i32* null, i32** %1
store i32* null, i32** %2
store i32* null, i32** %3
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = call i32 @_test_5(i32* %5, i32* %6, i32* %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @soru_5() {
%1 = tail call i32 @_test_5(i32* null, i32* null, i32* null, i32 0)
ret void
}
void default_case_path(name) char *name;
{ (char *)name; }


x86 assembly (clang, -O0):
<default_case_path>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_case_path>:
ret

LLVM IR (-O0):
define void @default_case_path(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @default_case_path(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
char *strrchr(char const *, char);
int dotright(const char *s) {
  char *p = strrchr(s, '.');
  return p ? strlen(p) - 1 : 0;
}


x86 assembly (clang, -O0):
<dotright>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <dotright+0x3d>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1167 <dotright+0x47>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1167 <dotright+0x47>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotright>:
push   %rax
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     113d <dotright+0x1d>
mov    %rax,%rdi
call   1030 <strlen@plt>
add    $0xffffffff,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dotright(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strlen(i8* %9)
%11 = sub nsw i32 %10, 1
br label %13
12: ; preds = %1
br label %13
13: ; preds = %12, %8
%14 = phi i32 [ %11, %8 ], [ 0, %12 ]
ret i32 %14
}

LLVM IR (-O2):
define i32 @dotright(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %2)
%6 = add nsw i32 %5, -1
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
void sdmmc_variant_init(struct mmci_host *host) {}


x86 assembly (clang, -O0):
<sdmmc_variant_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_variant_init>:
ret

LLVM IR (-O0):
%struct.mmci_host = type opaque
define void @sdmmc_variant_init(%struct.mmci_host* %0) {
%2 = alloca %struct.mmci_host*
store %struct.mmci_host* %0, %struct.mmci_host** %2
ret void
}

LLVM IR (-O2):
%struct.mmci_host = type opaque
define void @sdmmc_variant_init(%struct.mmci_host* nocapture %0) {
ret void
}
void g_ptr_array_set_size() {}


x86 assembly (clang, -O0):
<g_ptr_array_set_size>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_ptr_array_set_size>:
ret

LLVM IR (-O0):
define void @g_ptr_array_set_size() {
ret void
}

LLVM IR (-O2):
define void @g_ptr_array_set_size() {
ret void
}
int s_pipe_posix_uninit(void) { return 0; }


x86 assembly (clang, -O0):
<s_pipe_posix_uninit>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_pipe_posix_uninit>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @s_pipe_posix_uninit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @s_pipe_posix_uninit() {
ret i32 0
}
int stackoverflow() { return stackoverflow() + stackoverflow(); }


x86 assembly (clang, -O0):
<stackoverflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
call   1030 <stackoverflow@plt>
mov    %eax,-0x4(%rbp)
call   1030 <stackoverflow@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stackoverflow>:
push   %rax
call   1030 <stackoverflow@plt>
add    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stackoverflow() {
%1 = call i32 @stackoverflow()
%2 = call i32 @stackoverflow()
%3 = add nsw i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @stackoverflow() {
%1 = tail call i32 @stackoverflow()
%2 = shl nsw i32 %1, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void util_print_cpu_stats(FILE *fp) {
  (void)fprintf(fp, "Usage statistics not available\n");
}


x86 assembly (clang, -O0):
<util_print_cpu_stats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_print_cpu_stats>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Usage statistics not available\0A\00"
define void @util_print_cpu_stats(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Usage statistics not available\0A\00"
define void @util_print_cpu_stats(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 31, i64 1, i32* %0)
ret void
}