xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free_kbrd();
int /*<<< orphan*/ init_crbrd();
scalar_t__ init_kbrd();
int /*<<< orphan*/ p_keys();
int /*<<< orphan*/ scan_crbrd();
int /*<<< orphan*/ usleep(int);
int main(int argc, char **argv) {
  unsigned int i;
  if (init_kbrd()) {
    free_kbrd();
    return -1;
  }
  init_crbrd();
  while (1) {
    scan_crbrd();
    p_keys();
    usleep(100);
  }
  free_kbrd();
  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    $0x0,%al
call   1040 <init_kbrd@plt>
cmp    $0x0,%rax
je     1199 <main+0x39>
mov    $0x0,%al
call   1050 <free_kbrd@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1060 <init_crbrd@plt>
mov    $0x0,%al
call   1070 <scan_crbrd@plt>
mov    $0x0,%al
call   1030 <p_keys@plt>
mov    $0x64,%edi
call   1080 <usleep@plt>
jmp    11a0 <main+0x40>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_kbrd@plt>
test   %rax,%rax
je     117b <main+0x1b>
xor    %eax,%eax
call   1050 <free_kbrd@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1060 <init_crbrd@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1070 <scan_crbrd@plt>
xor    %eax,%eax
call   1030 <p_keys@plt>
mov    $0x64,%edi
call   1080 <usleep@plt>
jmp    1190 <main+0x30>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @init_kbrd()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @free_kbrd()
ret i32 -1
11: ; preds = %2
%12 = call i32 (...) @init_crbrd()
br label %13
13: ; preds = %11, %13
%14 = call i32 (...) @scan_crbrd()
%15 = call i32 (...) @p_keys()
%16 = call i32 @usleep(i32 100)
br label %13
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @init_kbrd()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @free_kbrd()
ret i32 -1
7: ; preds = %2
%8 = tail call i32 (...) @init_crbrd()
br label %9
9: ; preds = %9, %7
%10 = tail call i32 (...) @scan_crbrd()
%11 = tail call i32 (...) @p_keys()
%12 = tail call i32 @usleep(i32 100)
br label %9
}
float min(float lhs, float rhs) { return (lhs < rhs) ? lhs : rhs; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <min+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <min+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ *get_rfc3526_prime_4096(int /*<<< orphan*/ *);
BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn) {
  return get_rfc3526_prime_4096(bn);
}


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

x86 assembly (clang, -O2):
<BN_get_rfc3526_prime_4096>:
jmp    1030 <get_rfc3526_prime_4096@plt>

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

LLVM IR (-O2):
define i32* @BN_get_rfc3526_prime_4096(i32* %0) {
%2 = tail call i32* @get_rfc3526_prime_4096(i32* %0)
ret i32* %2
}
int fun199() { return 199; }


x86 assembly (clang, -O0):
<fun199>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun199>:
mov    $0xc7,%eax
ret

LLVM IR (-O0):
define i32 @fun199() {
ret i32 199
}

LLVM IR (-O2):
define i32 @fun199() {
ret i32 199
}
int sdi_init_platform_driver(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sdi_init_platform_driver() {
ret i32 0
}
void init_histvec() {}


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

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

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

LLVM IR (-O2):
define void @init_histvec() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
int vGetc();
int skipWhite(int c) {
  while (isspace(c))
    c = vGetc();
  return c;
}


x86 assembly (clang, -O0):
<skipWhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114c <skipWhite+0x2c>
mov    $0x0,%al
call   1040 <vGetc@plt>
mov    %eax,-0x4(%rbp)
jmp    112b <skipWhite+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWhite>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <isspace@plt>
test   %rax,%rax
je     1147 <skipWhite+0x27>
xor    %eax,%eax
call   1040 <vGetc@plt>
mov    %eax,%ebx
mov    %eax,%edi
jmp    1130 <skipWhite+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @skipWhite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = call i64 @isspace(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @vGetc()
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @skipWhite(i32 %0) {
%2 = tail call i64 @isspace(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = tail call i32 (...) @vGetc()
%6 = tail call i64 @isspace(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %1
%9 = phi i32 [ %0, %1 ], [ %5, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ recv_ack();
scalar_t__ send_msg(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int /*<<< orphan*/ strlen(char *);
void set_motors(int speed_l, int speed_r) {
  char buf[80];
  sprintf(buf, "M LR %d %d\n", speed_l, speed_r);
  if (send_msg(buf, strlen(buf))) {
    recv_ack();
  }
}


x86 assembly (clang, -O0):
<set_motors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xea1(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
cmp    $0x0,%rax
je     1191 <set_motors+0x51>
mov    $0x0,%al
call   1030 <recv_ack@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_motors>:
push   %rbx
sub    $0x50,%rsp
mov    %esi,%ecx
mov    %edi,%edx
lea    0xeb0(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <send_msg@plt>
test   %rax,%rax
je     1179 <set_motors+0x39>
xor    %eax,%eax
call   1030 <recv_ack@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"M LR %d %d\0A\00"
define void @set_motors(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [80 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = call i64 @send_msg(i8* %10, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @recv_ack()
br label %17
17: ; preds = %15, %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"M LR %d %d\0A\00"
define void @set_motors(i32 %0, i32 %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%6 = call i32 @strlen(i8* %4)
%7 = call i64 @send_msg(i8* %4, i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 (...) @recv_ack()
br label %11
11: ; preds = %9, %2
ret void
}
const char *Box_Definition(void) {
  return "struct Box {\n"
         "  var val;\n"
         "};\n";
}


x86 assembly (clang, -O0):
<Box_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Box_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"struct Box {\0A var val;\0A};\0A\00"
define i8* @Box_Definition() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [28 x i8] c"struct Box {\0A var val;\0A};\0A\00"
define i8* @Box_Definition() {
ret i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0)
}
void msm_dts_ion_memmap(struct param_outband *po) {
  pr_debug("%s\n", __func__);
}


x86 assembly (clang, -O0):
<msm_dts_ion_memmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_debug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msm_dts_ion_memmap>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
jmp    1030 <pr_debug@plt>

LLVM IR (-O0):
%struct.param_outband = type opaque
@.str = [4 x i8] c"%s\0A\00"
@__func__.msm_dts_ion_memmap = [19 x i8] c"msm_dts_ion_memmap\00"
define void @msm_dts_ion_memmap(%struct.param_outband* %0) {
%2 = alloca %struct.param_outband*
store %struct.param_outband* %0, %struct.param_outband** %2
%3 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.msm_dts_ion_memmap, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.param_outband = type opaque
@.str = [4 x i8] c"%s\0A\00"
@__func__.msm_dts_ion_memmap = [19 x i8] c"msm_dts_ion_memmap\00"
define void @msm_dts_ion_memmap(%struct.param_outband* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_debug to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.msm_dts_ion_memmap, i64 0, i64 0))
ret void
}
/* Type definitions */
struct image_object {
  int dummy;
};

/* Variables and functions */
int _singularity_image_offset(struct image_object *);
int singularity_image_offset(struct image_object *image) {
  return (_singularity_image_offset(image));
}


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

x86 assembly (clang, -O2):
<singularity_image_offset>:
jmp    1030 <_singularity_image_offset@plt>

LLVM IR (-O0):
%struct.image_object = type { i32 }
define i32 @singularity_image_offset(%struct.image_object* %0) {
%2 = alloca %struct.image_object*
store %struct.image_object* %0, %struct.image_object** %2
%3 = load %struct.image_object*, %struct.image_object** %2
%4 = call i32 @_singularity_image_offset(%struct.image_object* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.image_object = type { i32 }
define i32 @singularity_image_offset(%struct.image_object* %0) {
%2 = tail call i32 @_singularity_image_offset(%struct.image_object* %0)
ret i32 %2
}
int test_imm_F1uint16_mem(unsigned short *val) {
  return ((*val) & (0xF1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F1uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 241
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef float uint16_t;

/* Variables and functions */
float Bq34z100BusRawToVolts(uint16_t bus_raw, float cell_mult) {
  return 0.001f * (bus_raw * cell_mult);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xee0(%rip),%xmm0
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
mulss  %xmm1,%xmm0
mulss  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define float @Bq34z100BusRawToVolts(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
%8 = fmul float 0x3F50624DE0000000, %7
ret float %8
}

LLVM IR (-O2):
define float @Bq34z100BusRawToVolts(float %0, float %1) {
%3 = fmul float %0, %1
%4 = fmul float %3, 0x3F50624DE0000000
ret float %4
}
void SSI2_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SSI2_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SSI2_Handler+0x9>
jmp    1109 <SSI2_Handler+0x9>

x86 assembly (clang, -O2):
<SSI2_Handler>:
jmp    1100 <SSI2_Handler>

LLVM IR (-O0):
define void @SSI2_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SSI2_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ dajmid(int /*<<< orphan*/);
scalar_t__ e_na_x(float, int);
scalar_t__ exp(float);
int /*<<< orphan*/ fabs(scalar_t__);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, float *, int *);
int main() {
  int n;
  float x;
  printf("Unesite x i n: ");
  scanf("%f %d", &x, &n);
  dajmid(fabs(e_na_x(x, n) - exp(x)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1080 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1050 <e_na_x@plt>
mov    %rax,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
call   1070 <exp@plt>
mov    -0x18(%rbp),%rdi
sub    %rax,%rdi
call   1060 <fabs@plt>
mov    %eax,%edi
call   1030 <dajmid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1080 <scanf@plt>
movss  0x8(%rsp),%xmm0
mov    0xc(%rsp),%edi
call   1050 <e_na_x@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
call   1070 <exp@plt>
sub    %rax,%rbx
mov    %rbx,%rdi
call   1060 <fabs@plt>
mov    %eax,%edi
call   1030 <dajmid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Unesite x i n: \00"
@.str.1 = [6 x i8] c"%f %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %3, i32* %2)
%6 = load float, float* %3
%7 = load i32, i32* %2
%8 = call i64 @e_na_x(float %6, i32 %7)
%9 = load float, float* %3
%10 = call i64 @exp(float %9)
%11 = sub nsw i64 %8, %10
%12 = call i32 @fabs(i64 %11)
%13 = call i32 @dajmid(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Unesite x i n: \00"
@.str.1 = [6 x i8] c"%f %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, i32* %1)
%7 = load float, float* %2
%8 = load i32, i32* %1
%9 = call i64 @e_na_x(float %7, i32 %8)
%10 = load float, float* %2
%11 = call i64 @exp(float %10)
%12 = sub nsw i64 %9, %11
%13 = call i32 @fabs(i64 %12)
%14 = call i32 @dajmid(i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
void hangup(int sig) {
  syslog(LOG_INFO, "TTY Closed!, killing self");
  exit(0);
}


x86 assembly (clang, -O0):
<hangup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <syslog@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<hangup>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <syslog@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@LOG_INFO = global i32 0
@.str = [26 x i8] c"TTY Closed!, killing self\00"
define void @hangup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @LOG_INFO
%4 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
@.str = [26 x i8] c"TTY Closed!, killing self\00"
define void @hangup(i32 %0) {
%2 = load i32, i32* @LOG_INFO
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, int, int);
int semget(key_t key, int n, int fl) { return syscall(299, key, n, fl); }


x86 assembly (clang, -O0):
<semget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x12b,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semget>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x12b,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @semget(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 @syscall(i32 299, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @semget(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 299, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
char *strcpy(char *, char *);
int strlen(char *);
char *util_strsav(char *s) {
  return strcpy(((char *)malloc(sizeof(char) * (strlen(s) + 1))), s);
}


x86 assembly (clang, -O0):
<util_strsav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_strsav>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @util_strsav(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = mul i64 1, %6
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @util_strsav(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ramput(int /*<<< orphan*/, int *);
void ramput_hybrid(uint32_t addr, int *val) { ramput(addr, val); }


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

x86 assembly (clang, -O2):
<ramput_hybrid>:
jmp    1030 <ramput@plt>

LLVM IR (-O0):
define void @ramput_hybrid(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = call i32 @ramput(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @ramput_hybrid(i32 %0, i32* %1) {
%3 = tail call i32 @ramput(i32 %0, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int sfd_remove_trailing_spaces(char *fname) {
  printf("%s", fname);
  return 0;
}


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

x86 assembly (clang, -O2):
<sfd_remove_trailing_spaces>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @sfd_remove_trailing_spaces(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
int comp_long(long *ptr1, long *ptr2) { return (*ptr1 - *ptr2); }


x86 assembly (clang, -O0):
<comp_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_long>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @comp_long(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = sub nsw i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @comp_long(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = sub nsw i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Type definitions */
struct tl880_dev {
  int dummy;
};

/* Variables and functions */
scalar_t__ tl880_read_regbits(struct tl880_dev *, int, int, int);
int tl880_dma_vop_on(struct tl880_dev *tl880dev) {
  return tl880_read_regbits(tl880dev, 10000, 4, 4) ? 1 : 0;
}


x86 assembly (clang, -O0):
<tl880_dma_vop_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2710,%esi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <tl880_read_regbits@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl880_dma_vop_on>:
push   %rax
mov    $0x2710,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <tl880_read_regbits@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tl880_dev = type { i32 }
define i32 @tl880_dma_vop_on(%struct.tl880_dev* %0) {
%2 = alloca %struct.tl880_dev*
store %struct.tl880_dev* %0, %struct.tl880_dev** %2
%3 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%4 = call i64 @tl880_read_regbits(%struct.tl880_dev* %3, i32 10000, i32 4, i32 4)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
%struct.tl880_dev = type { i32 }
define i32 @tl880_dma_vop_on(%struct.tl880_dev* %0) {
%2 = tail call i64 @tl880_read_regbits(%struct.tl880_dev* %0, i32 10000, i32 4, i32 4)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int getPositionInAlphabet_For(char c) {
  for (int offset = 0; offset < 26; offset++) {
    if ('a' + offset != c) {
      continue;
    }
    return offset;
  }
  return -1;
}


x86 assembly (clang, -O0):
<getPositionInAlphabet_For>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    114b <getPositionInAlphabet_For+0x4b>
mov    -0xc(%rbp),%eax
add    $0x61,%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
je     1132 <getPositionInAlphabet_For+0x32>
jmp    113d <getPositionInAlphabet_For+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <getPositionInAlphabet_For+0x52>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <getPositionInAlphabet_For+0x11>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPositionInAlphabet_For>:
lea    -0x61(%rdi),%eax
cmp    $0x19,%eax
mov    $0x19,%ecx
cmovb  %eax,%ecx
lea    -0x61(%rdi),%eax
cmp    $0x1a,%al
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getPositionInAlphabet_For(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
%4 = call i32 @llvm.umin.i32(i32 %3, i32 25)
%5 = add i8 %0, -97
%6 = icmp ult i8 %5, 26
%7 = select i1 %6, i32 %4, i32 -1
ret i32 %7
}
/* Type definitions */
struct sigcontext {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ handle_signal(int, struct sigcontext *);
void hard_handler(int sig) {
  handle_signal(sig, (struct sigcontext *)(&sig + 1));
}


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

x86 assembly (clang, -O2):
<hard_handler>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <handle_signal@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sigcontext = type { i32 }
define void @hard_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %2, i64 1
%5 = bitcast i32* %4 to %struct.sigcontext*
%6 = call i32 @handle_signal(i32 %3, %struct.sigcontext* %5)
ret void
}

LLVM IR (-O2):
%struct.sigcontext = type { i32 }
define void @hard_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = getelementptr inbounds i32, i32* %2, i64 1
%4 = bitcast i32* %3 to %struct.sigcontext*
%5 = call i32 @handle_signal(i32 %0, %struct.sigcontext* %4)
ret void
}
int x11_process_synack(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x11_process_synack(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int rand();
int pivot(int a[], int i, int j) {
  int pivot = i + rand() % (j - i + 1);
  return pivot;
}


x86 assembly (clang, -O0):
<pivot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x10(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pivot>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @pivot(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @rand()
%5 = sub i32 1, %1
%6 = add i32 %5, %2
%7 = srem i32 %4, %6
%8 = add nsw i32 %7, %1
ret i32 %8
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void gpio_afsel(uint32_t *port, uint8_t pins, uint8_t state) {
  if (state) {
    port[0x420 / 4] |= pins;
  } else {
    port[0x420 / 4] &= ~pins;
  }
}


x86 assembly (clang, -O0):
<gpio_afsel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1136 <gpio_afsel+0x36>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
or     0x840(%rax),%rcx
mov    %rcx,0x840(%rax)
jmp    1150 <gpio_afsel+0x50>
mov    -0x10(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x8(%rbp),%rax
and    0x840(%rax),%rcx
mov    %rcx,0x840(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_afsel>:
test   %rdx,%rdx
je     110d <gpio_afsel+0xd>
or     %rsi,0x840(%rdi)
ret
not    %rsi
and    %rsi,0x840(%rdi)
ret

LLVM IR (-O0):
define void @gpio_afsel(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i64, i64* %5
%11 = load i64*, i64** %4
%12 = getelementptr inbounds i64, i64* %11, i64 264
%13 = load i64, i64* %12
%14 = or i64 %13, %10
store i64 %14, i64* %12
br label %22
15: ; preds = %3
%16 = load i64, i64* %5
%17 = xor i64 %16, -1
%18 = load i64*, i64** %4
%19 = getelementptr inbounds i64, i64* %18, i64 264
%20 = load i64, i64* %19
%21 = and i64 %20, %17
store i64 %21, i64* %19
br label %22
22: ; preds = %15, %9
ret void
}

LLVM IR (-O2):
define void @gpio_afsel(i64* nocapture %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = getelementptr inbounds i64, i64* %0, i64 264
%7 = load i64, i64* %6
%8 = or i64 %7, %1
store i64 %8, i64* %6
br label %14
9: ; preds = %3
%10 = xor i64 %1, -1
%11 = getelementptr inbounds i64, i64* %0, i64 264
%12 = load i64, i64* %11
%13 = and i64 %12, %10
store i64 %13, i64* %11
br label %14
14: ; preds = %9, %5
ret void
}
/* Variables and functions */
int om_screen_actual_brightness_get();
int om_screen_brightness_get();
int om_screen_power_get() {
  int brightness, actual_brightness;
  if ((brightness = om_screen_brightness_get()) < 0)
    return -1;
  if ((actual_brightness = om_screen_actual_brightness_get()) < 0)
    return -2;
  return brightness == actual_brightness;
}


x86 assembly (clang, -O0):
<om_screen_power_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <om_screen_brightness_get@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1147 <om_screen_power_get+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <om_screen_power_get+0x57>
mov    $0x0,%al
call   1040 <om_screen_actual_brightness_get@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1166 <om_screen_power_get+0x46>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1177 <om_screen_power_get+0x57>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_screen_power_get>:
push   %rbx
xor    %eax,%eax
call   1030 <om_screen_brightness_get@plt>
test   %eax,%eax
js     1144 <om_screen_power_get+0x24>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <om_screen_actual_brightness_get@plt>
test   %eax,%eax
js     114b <om_screen_power_get+0x2b>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%ebx
sete   %al
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret
mov    $0xfffffffe,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @om_screen_power_get() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @om_screen_brightness_get()
store i32 %4, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %16
7: ; preds = %0
%8 = call i32 (...) @om_screen_actual_brightness_get()
store i32 %8, i32* %3
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 -2, i32* %1
br label %16
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
store i32 %15, i32* %1
br label %16
16: ; preds = %11, %10, %6
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @om_screen_power_get() {
%1 = tail call i32 (...) @om_screen_brightness_get()
%2 = icmp slt i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @om_screen_actual_brightness_get()
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = icmp eq i32 %1, %4
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %3, %0, %6
%10 = phi i32 [ %8, %6 ], [ -1, %0 ], [ -2, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bye(void) { printf("have a good day !/n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"have a good day !/n\00"
define void @bye() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"have a good day !/n\00"
define void @bye() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
int congHaiSo(int soThu1, int soThu2) {
  int ketQua = soThu1 + soThu2;
  return ketQua;
}


x86 assembly (clang, -O0):
<congHaiSo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<congHaiSo>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @congHaiSo(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
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @congHaiSo(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
struct slre_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ re_rng2set(struct slre_env *, char, int);
void re_W_2set(struct slre_env *e) {
  re_rng2set(e, 0, '0' - 1);
  re_rng2set(e, '9' + 1, 'A' - 1);
  re_rng2set(e, 'Z' + 1, '_' - 1);
  re_rng2set(e, '_' + 1, 'a' - 1);
  re_rng2set(e, 'z' + 1, 0xFFFF);
}


x86 assembly (clang, -O0):
<re_W_2set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2f,%edx
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
mov    $0x40,%edx
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x5b,%esi
mov    $0x5e,%edx
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x60,%edx
mov    %edx,%esi
call   1030 <re_rng2set@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7b,%esi
mov    $0xffff,%edx
call   1030 <re_rng2set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_W_2set>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x2f,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x3a,%esi
mov    $0x40,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x5b,%esi
mov    $0x5e,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x60,%esi
mov    $0x60,%edx
call   1030 <re_rng2set@plt>
mov    %rbx,%rdi
mov    $0x7b,%esi
mov    $0xffff,%edx
pop    %rbx
jmp    1030 <re_rng2set@plt>

LLVM IR (-O0):
%struct.slre_env = type { i32 }
define void @re_W_2set(%struct.slre_env* %0) {
%2 = alloca %struct.slre_env*
store %struct.slre_env* %0, %struct.slre_env** %2
%3 = load %struct.slre_env*, %struct.slre_env** %2
%4 = call i32 @re_rng2set(%struct.slre_env* %3, i8 signext 0, i32 47)
%5 = load %struct.slre_env*, %struct.slre_env** %2
%6 = call i32 @re_rng2set(%struct.slre_env* %5, i8 signext 58, i32 64)
%7 = load %struct.slre_env*, %struct.slre_env** %2
%8 = call i32 @re_rng2set(%struct.slre_env* %7, i8 signext 91, i32 94)
%9 = load %struct.slre_env*, %struct.slre_env** %2
%10 = call i32 @re_rng2set(%struct.slre_env* %9, i8 signext 96, i32 96)
%11 = load %struct.slre_env*, %struct.slre_env** %2
%12 = call i32 @re_rng2set(%struct.slre_env* %11, i8 signext 123, i32 65535)
ret void
}

LLVM IR (-O2):
%struct.slre_env = type { i32 }
define void @re_W_2set(%struct.slre_env* %0) {
%2 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 0, i32 47)
%3 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 58, i32 64)
%4 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 91, i32 94)
%5 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 96, i32 96)
%6 = tail call i32 @re_rng2set(%struct.slre_env* %0, i8 signext 123, i32 65535)
ret void
}
int efunc1() { return 1; }


x86 assembly (clang, -O0):
<efunc1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<efunc1>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @efunc1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @efunc1() {
ret i32 1
}
void av_format_get_video_codec() {}


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

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

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

LLVM IR (-O2):
define void @av_format_get_video_codec() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ type;
};
typedef TYPE_1__ XNoExposeEvent;

/* Variables and functions */
int get_XNoExposeEvent_type(void *_p) {
  return (int)((XNoExposeEvent *)_p)->type;
}


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

x86 assembly (clang, -O2):
<get_XNoExposeEvent_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XNoExposeEvent_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XNoExposeEvent_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ mmc3SetChrROMBankPtr();
int /*<<< orphan*/ mmc3SetChrROMadd0XXX(int);
int /*<<< orphan*/ mmc3SetChrROMadd1XXX(int);
void m12setParams4XXX(uint16_t addr, uint8_t val) {
  (void)addr;
  mmc3SetChrROMadd0XXX((val & 0x01) ? 0x40000 : 0);
  mmc3SetChrROMadd1XXX((val & 0x10) ? 0x40000 : 0);
  mmc3SetChrROMBankPtr();
}


x86 assembly (clang, -O0):
<m12setParams4XXX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
and    $0x1,%ecx
xor    %edi,%edi
mov    $0x40000,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
call   1030 <mmc3SetChrROMadd0XXX@plt>
mov    -0x8(%rbp),%ecx
and    $0x10,%ecx
xor    %edi,%edi
mov    $0x40000,%eax
cmp    $0x0,%ecx
cmovne %eax,%edi
call   1040 <mmc3SetChrROMadd1XXX@plt>
mov    $0x0,%al
call   1050 <mmc3SetChrROMBankPtr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m12setParams4XXX>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0x1,%edi
shl    $0x12,%edi
call   1030 <mmc3SetChrROMadd0XXX@plt>
and    $0x10,%ebx
shl    $0xe,%ebx
mov    %ebx,%edi
call   1040 <mmc3SetChrROMadd1XXX@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <mmc3SetChrROMBankPtr@plt>

LLVM IR (-O0):
define void @m12setParams4XXX(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %6, 1
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 262144, i32 0
%11 = call i32 @mmc3SetChrROMadd0XXX(i32 %10)
%12 = load i32, i32* %4
%13 = and i32 %12, 16
%14 = icmp ne i32 %13, 0
%15 = zext i1 %14 to i64
%16 = select i1 %14, i32 262144, i32 0
%17 = call i32 @mmc3SetChrROMadd1XXX(i32 %16)
%18 = call i32 (...) @mmc3SetChrROMBankPtr()
ret void
}

LLVM IR (-O2):
define void @m12setParams4XXX(i32 %0, i32 %1) {
%3 = shl i32 %1, 18
%4 = and i32 %3, 262144
%5 = tail call i32 @mmc3SetChrROMadd0XXX(i32 %4)
%6 = shl i32 %1, 14
%7 = and i32 %6, 262144
%8 = tail call i32 @mmc3SetChrROMadd1XXX(i32 %7)
%9 = tail call i32 (...) @mmc3SetChrROMBankPtr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArray(int *nums, int size) {
  for (int i = 0; i < size; i++)
    printf("%d, ", nums[i]);
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d, \00"
define void @printArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ do_cmd_messages();
int /*<<< orphan*/ screen_load();
int /*<<< orphan*/ screen_save();
void death_messages(void *unused, const char *title) {
  (void)unused;
  (void)title;
  screen_save();
  do_cmd_messages();
  screen_load();
}


x86 assembly (clang, -O0):
<death_messages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <screen_save@plt>
mov    $0x0,%al
call   1050 <do_cmd_messages@plt>
mov    $0x0,%al
call   1030 <screen_load@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<death_messages>:
push   %rax
xor    %eax,%eax
call   1040 <screen_save@plt>
xor    %eax,%eax
call   1050 <do_cmd_messages@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <screen_load@plt>

LLVM IR (-O0):
define void @death_messages(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (...) @screen_save()
%8 = call i32 (...) @do_cmd_messages()
%9 = call i32 (...) @screen_load()
ret void
}

LLVM IR (-O2):
define void @death_messages(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @screen_save()
%4 = tail call i32 (...) @do_cmd_messages()
%5 = tail call i32 (...) @screen_load()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\n hello world  \n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0A hello world \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"\0A hello world \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}