xunge/DecIR huggingface dataset:
int cpuidle_register_driver(struct cpuidle_driver *drv) { return -19; }


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

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

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

LLVM IR (-O2):
%struct.cpuidle_driver = type opaque
define i32 @cpuidle_register_driver(%struct.cpuidle_driver* nocapture readnone %0) {
ret i32 -19
}
/* Variables and functions */
double sio_sync_read_double();
double read_double(void) { return sio_sync_read_double(); }


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

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

LLVM IR (-O0):
define double @read_double() {
%1 = call double (...) @sio_sync_read_double()
ret double %1
}

LLVM IR (-O2):
define double @read_double() {
%1 = tail call double (...) @sio_sync_read_double()
ret double %1
}
/* Type definitions */
typedef int /*<<< orphan*/ dir;

/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
void printCWD() {
  char dir[1024];
  getcwd(dir, sizeof(dir));
  if (dir == NULL)
    perror("ERROR WHILE GETTING CURRENT WORKING DIRECTORY");
  printf("CWD is %s\n", dir);
}


x86 assembly (clang, -O0):
<printCWD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
lea    -0x400(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCWD>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"CWD is %s\0A\00"
define void @printCWD() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @getcwd(i8* %2, i32 1024)
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"CWD is %s\0A\00"
define void @printCWD() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @getcwd(i8* %2, i32 1024)
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t select_int16_t() { return 1 | (1 << 1); }


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

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

LLVM IR (-O0):
define i32 @select_int16_t() {
ret i32 3
}

LLVM IR (-O2):
define i32 @select_int16_t() {
ret i32 3
}
void rop3_240_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  *D = (T & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_240_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_240_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_240_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = and i32 %8, %11
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = xor i32 %14, -1
%16 = and i32 %12, %15
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = and i32 %19, %21
%23 = or i32 %16, %22
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = load i8, i8* %6
%28 = zext i8 %27 to i32
%29 = and i32 %26, %28
%30 = or i32 %23, %29
%31 = trunc i32 %30 to i8
%32 = load i8*, i8** %4
store i8 %31, i8* %32
ret void
}

LLVM IR (-O2):
define void @rop3_240_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void __attribute__((noreturn)) __do_landing_pad(int x, int (*ptr)()) {}


x86 assembly (clang, -O0):
<__do_landing_pad>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @__do_landing_pad(i32 %0, i32 (...)* %1) {
%3 = alloca i32
%4 = alloca i32 (...)*
store i32 %0, i32* %3
store i32 (...)* %1, i32 (...)** %4
unreachable
}

LLVM IR (-O2):
/* Type definitions */
typedef scalar_t__ __m256;

/* Variables and functions */
void _avx_iadd(__m256 *a, __m256 b) { *a += b; }


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

x86 assembly (clang, -O2):
<_avx_iadd>:
add    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @_avx_iadd(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = add nsw i64 %7, %5
store i64 %8, i64* %6
ret void
}

LLVM IR (-O2):
define void @_avx_iadd(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = add nsw i64 %3, %1
store i64 %4, i64* %0
ret void
}
/* Variables and functions */
short h_dnnt(double *);
short intr_wrap_407(double p1) { return h_dnnt(&p1); }


x86 assembly (clang, -O0):
<intr_wrap_407>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <h_dnnt@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_407>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <h_dnnt@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_407(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call signext i16 @h_dnnt(double* %2)
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @intr_wrap_407(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call signext i16 @h_dnnt(double* %2)
ret i16 %3
}
/* Variables and functions */
double sin(double);
double fcn_sin(double x) { return (sin(x)); }


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

x86 assembly (clang, -O2):
<fcn_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @fcn_sin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void kms_request_free_string(char *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<kms_request_free_string>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @kms_request_free_string(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct reb_simulation {
  int dummy;
};

/* Variables and functions */
scalar_t__ reb_output_check(struct reb_simulation *, int);
int /*<<< orphan*/ reb_output_timing(struct reb_simulation *,
                                     int /*<<< orphan*/);
void heartbeat(struct reb_simulation *r) {
  if (reb_output_check(r, 2. * 3.14159265358979323846)) {
    reb_output_timing(r, 0);
  }
}


x86 assembly (clang, -O0):
<heartbeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1040 <reb_output_check@plt>
cmp    $0x0,%rax
je     114f <heartbeat+0x2f>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <reb_output_timing@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heartbeat>:
push   %rbx
mov    %rdi,%rbx
mov    $0x6,%esi
call   1040 <reb_output_check@plt>
test   %rax,%rax
je     113e <heartbeat+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <reb_output_timing@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.reb_simulation = type { i32 }
define void @heartbeat(%struct.reb_simulation* %0) {
%2 = alloca %struct.reb_simulation*
store %struct.reb_simulation* %0, %struct.reb_simulation** %2
%3 = load %struct.reb_simulation*, %struct.reb_simulation** %2
%4 = call i64 @reb_output_check(%struct.reb_simulation* %3, i32 6)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.reb_simulation*, %struct.reb_simulation** %2
%8 = call i32 @reb_output_timing(%struct.reb_simulation* %7, i32 0)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.reb_simulation = type { i32 }
define void @heartbeat(%struct.reb_simulation* %0) {
%2 = tail call i64 @reb_output_check(%struct.reb_simulation* %0, i32 6)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @reb_output_timing(%struct.reb_simulation* %0, i32 0)
br label %6
6: ; preds = %4, %1
ret void
}
void _Z11_Jv_SetArgsiPPKc(void) {}


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

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

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

LLVM IR (-O2):
define void @_Z11_Jv_SetArgsiPPKc() {
ret void
}
int evenOdd(int inputNum) {
  int result = inputNum % 2;
  if (result == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<evenOdd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    112b <evenOdd+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1132 <evenOdd+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<evenOdd>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @evenOdd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = srem i32 %5, 2
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @evenOdd(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int system(char *);
void pof_rmmod() {
  int ret = system("modprobe -r pofswitch");
  if (ret) {
    printf("ERROR:can't rmmod pofswitch\n");
  }
}


x86 assembly (clang, -O0):
<pof_rmmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114d <pof_rmmod+0x2d>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pof_rmmod>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
test   %eax,%eax
je     113e <pof_rmmod+0x1e>
lea    0xede(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"modprobe -r pofswitch\00"
@.str.1 = [29 x i8] c"ERROR:can't rmmod pofswitch\0A\00"
define void @pof_rmmod() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"modprobe -r pofswitch\00"
@str = [28 x i8] c"ERROR:can't rmmod pofswitch\00"
define void @pof_rmmod() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
void BrzPassivatorPush_ackdown(struct comp *comp, int port) {}


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

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

LLVM IR (-O0):
%struct.comp = type opaque
define void @BrzPassivatorPush_ackdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.comp = type opaque
define void @BrzPassivatorPush_ackdown(%struct.comp* nocapture %0, i32 %1) {
ret void
}
int prcmu_enable_spi2(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @prcmu_enable_spi2() {
ret i32 0
}
void gtk_tree_selection_select_range() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_select_range() {
ret void
}
int test_imm_D7uint8_reg(unsigned char val) {
  return ((val) & (-0xD7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D7uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff29,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D7uint8_reg>:
test   $0x29,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D7uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -215
%6 = icmp ne i32 %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_D7uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 41
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void ppt2() {}


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

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

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

LLVM IR (-O2):
define void @ppt2() {
ret void
}
int pkw(int a, int b) {
  int pole;
  pole = a * b;
  return pole;
}


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

x86 assembly (clang, -O2):
<pkw>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @pkw(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ IF_NetKey();
int /*<<< orphan*/ IF_netDropS();
int /*<<< orphan*/ IF_netS2U();
int /*<<< orphan*/ putLong(long long);
void RemotExecBegin(long long k) {
  putLong(k);
  IF_NetKey();
  IF_netS2U();
  IF_netDropS();
}


x86 assembly (clang, -O0):
<RemotExecBegin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <putLong@plt>
mov    $0x0,%al
call   1050 <IF_NetKey@plt>
mov    $0x0,%al
call   1060 <IF_netS2U@plt>
mov    $0x0,%al
call   1030 <IF_netDropS@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemotExecBegin>:
push   %rax
call   1040 <putLong@plt>
xor    %eax,%eax
call   1050 <IF_NetKey@plt>
xor    %eax,%eax
call   1060 <IF_netS2U@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <IF_netDropS@plt>

LLVM IR (-O0):
define void @RemotExecBegin(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @putLong(i64 %3)
%5 = call i32 (...) @IF_NetKey()
%6 = call i32 (...) @IF_netS2U()
%7 = call i32 (...) @IF_netDropS()
ret void
}

LLVM IR (-O2):
define void @RemotExecBegin(i64 %0) {
%2 = tail call i32 @putLong(i64 %0)
%3 = tail call i32 (...) @IF_NetKey()
%4 = tail call i32 (...) @IF_netS2U()
%5 = tail call i32 (...) @IF_netDropS()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void chPlayer(char ch, int times) {
  int i = 0;
  for (i = 0; i < times; ++i) {
    putchar(ch);
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<chPlayer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1152 <chPlayer+0x42>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <chPlayer+0x1f>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chPlayer>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    112c <chPlayer+0x1c>
mov    %esi,%ebx
movsbl %dil,%ebp
nopl   (%rax)
mov    %ebp,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <chPlayer+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @chPlayer(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8, i8* %3
%12 = call i32 @putchar(i8 signext %11)
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
%17 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @chPlayer(i8 signext %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @putchar(i8 signext %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_pixel(int, int, short);
void draw_linevert(int x, int y, int length, short colour) {
  int i = 0;
  for (i = 0; i < length; i++) {
    write_pixel(x, y + i, colour);
  }
}


x86 assembly (clang, -O0):
<draw_linevert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <draw_linevert+0x52>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x14(%rbp),%esi
movswl -0xe(%rbp),%edx
call   1030 <write_pixel@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <draw_linevert+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_linevert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1145 <draw_linevert+0x35>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
movswl %cx,%r15d
cs nopw 0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %r15d,%edx
call   1030 <write_pixel@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
jne    1130 <draw_linevert+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @draw_linevert(i32 %0, i32 %1, i32 %2, i16 signext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i16
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i16 %3, i16* %8
store i32 0, i32* %9
store i32 0, i32* %9
br label %10
10: ; preds = %21, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %7
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %24
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32, i32* %9
%18 = add nsw i32 %16, %17
%19 = load i16, i16* %8
%20 = call i32 @write_pixel(i32 %15, i32 %18, i16 signext %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %9
%23 = add nsw i32 %22, 1
store i32 %23, i32* %9
br label %10
24: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @draw_linevert(i32 %0, i32 %1, i32 %2, i16 signext %3) {
%5 = icmp sgt i32 %2, 0
br i1 %5, label %6, label %12
6: ; preds = %4, %6
%7 = phi i32 [ %10, %6 ], [ 0, %4 ]
%8 = add nsw i32 %7, %1
%9 = tail call i32 @write_pixel(i32 %0, i32 %8, i16 signext %3)
%10 = add nuw nsw i32 %7, 1
%11 = icmp eq i32 %10, %2
br i1 %11, label %12, label %6
12: ; preds = %6, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mem_copy_dword2dword_big(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/ const);
uint32_t arch_mem_copy_dword2dword_big(uint32_t *dword_d,
                                       const uint32_t dword_s) {
  return mem_copy_dword2dword_big(dword_d, dword_s);
}


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

x86 assembly (clang, -O2):
<arch_mem_copy_dword2dword_big>:
jmp    1030 <mem_copy_dword2dword_big@plt>

LLVM IR (-O0):
define i32 @arch_mem_copy_dword2dword_big(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 @mem_copy_dword2dword_big(i32* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @arch_mem_copy_dword2dword_big(i32* %0, i32 %1) {
%3 = tail call i32 @mem_copy_dword2dword_big(i32* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ nrfx_usbd_errata_type_52840_eng_b();
bool nrfx_usbd_errata_104(void) {
  return (1 && (!nrfx_usbd_errata_type_52840_eng_b()));
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_104>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrfx_usbd_errata_104>:
push   %rax
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_104() {
%1 = call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_104() {
%1 = tail call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void driver_usr1() { printf("let's go go go!\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"let's go go go!\0A\00"
define void @driver_usr1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"let's go go go!\00"
define void @driver_usr1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ asinh(float);
float asinhf(float x) { return (float)asinh(x); }


x86 assembly (clang, -O0):
<asinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <asinh@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinhf>:
push   %rax
call   1030 <asinh@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @asinhf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @asinh(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @asinhf(float %0) {
%2 = tail call i64 @asinh(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
void OOC_WarshallC_open(void) {}


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

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

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

LLVM IR (-O2):
define void @OOC_WarshallC_open() {
ret void
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct passwd *getpwnam(const char *name __attribute__((unused))) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<getpwnam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpwnam>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.passwd* @getpwnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.passwd* @getpwnam(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret %struct.passwd* null
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
off_t file_offset_from_row_index(size_t row_index) {
  return (off_t)row_index * (off_t)((sizeof(char)) + 2 * 9);
}


x86 assembly (clang, -O0):
<file_offset_from_row_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x13,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_offset_from_row_index>:
lea    (%rdi,%rdi,8),%eax
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @file_offset_from_row_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = mul nsw i32 %4, 19
ret i32 %5
}

LLVM IR (-O2):
define i32 @file_offset_from_row_index(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = mul nsw i32 %2, 19
ret i32 %3
}
int getSizeOfString(char *string, int maxLength) {
  int i;
  for (i = 0; i < maxLength; i++) {
    if (string[i] == '\0') {
      return i + 1;
    }
  }
  return maxLength;
}


x86 assembly (clang, -O0):
<getSizeOfString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <getSizeOfString+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    1141 <getSizeOfString+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115a <getSizeOfString+0x5a>
jmp    1146 <getSizeOfString+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <getSizeOfString+0x12>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSizeOfString>:
mov    %esi,%eax
test   %esi,%esi
jle    111f <getSizeOfString+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rdi,%rcx,1)
je     1120 <getSizeOfString+0x20>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <getSizeOfString+0x10>
ret
add    $0x1,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getSizeOfString(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %26
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %28
22: ; preds = %11
br label %23
23: ; preds = %22
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = load i32, i32* %5
store i32 %27, i32* %3
br label %28
28: ; preds = %26, %19
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @getSizeOfString(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %14
%7 = phi i64 [ 0, %4 ], [ %15, %14 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = trunc i64 %7 to i32
%13 = add nuw nsw i32 %12, 1
br label %17
14: ; preds = %6
%15 = add nuw nsw i64 %7, 1
%16 = icmp eq i64 %15, %5
br i1 %16, label %17, label %6
17: ; preds = %14, %2, %11
%18 = phi i32 [ %13, %11 ], [ %1, %2 ], [ %1, %14 ]
ret i32 %18
}
/* Variables and functions */
int test1();
int __attribute__((bnd_legacy, no)) test2() { return test1(); }


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

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

LLVM IR (-O0):
define i32 @test2() {
%1 = call i32 (...) @test1()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test2() {
%1 = tail call i32 (...) @test1()
ret i32 %1
}
/* Variables and functions */
int dup2(int, int);
int /*<<< orphan*/ unix_error(char *);
int csapp_dup2(int fd1, int fd2) {
  int rc;
  if ((rc = dup2(fd1, fd2)) < 0)
    unix_error("dup2 error");
  return rc;
}


x86 assembly (clang, -O0):
<csapp_dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1151 <csapp_dup2+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <unix_error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csapp_dup2>:
push   %rbx
call   1030 <dup2@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <csapp_dup2+0x18>
lea    0xecd(%rip),%rdi
call   1040 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"dup2 error\00"
define i32 @csapp_dup2(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 = call i32 @dup2(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"dup2 error\00"
define i32 @csapp_dup2(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ AltitudeHoldSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void AltitudeHoldSettingsRequestUpdate() {
  UAVObjRequestUpdate(AltitudeHoldSettingsHandle());
}


x86 assembly (clang, -O0):
<AltitudeHoldSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AltitudeHoldSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AltitudeHoldSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <AltitudeHoldSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @AltitudeHoldSettingsRequestUpdate() {
%1 = call i32 (...) @AltitudeHoldSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AltitudeHoldSettingsRequestUpdate() {
%1 = tail call i32 (...) @AltitudeHoldSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int probe_function(int);
int target_function(int);
int main() {
  int n = 100;
  int x;
  x = target_function(n);
  printf("%d", probe_function(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <target_function@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <probe_function@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1040 <target_function@plt>
mov    %eax,%edi
call   1050 <probe_function@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 100, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @target_function(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @probe_function(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @target_function(i32 100)
%2 = tail call i32 @probe_function(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
void Plain_NullPrintAfterLastPage(void) {}


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

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

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

LLVM IR (-O2):
define void @Plain_NullPrintAfterLastPage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nanotest_putchar(char);
void nanotest_puthline(char ch, unsigned int n) {
  nanotest_putchar('\n');
  while (n--)
    nanotest_putchar(ch);
  nanotest_putchar('\n');
}


x86 assembly (clang, -O0):
<nanotest_puthline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xa,%edi
call   1030 <nanotest_putchar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     114d <nanotest_puthline+0x3d>
movsbl -0x1(%rbp),%edi
call   1030 <nanotest_putchar@plt>
jmp    112b <nanotest_puthline+0x1b>
mov    $0xa,%edi
call   1030 <nanotest_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nanotest_puthline>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xa,%edi
call   1030 <nanotest_putchar@plt>
test   %ebx,%ebx
je     113c <nanotest_puthline+0x2c>
movsbl %bpl,%ebp
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <nanotest_putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <nanotest_puthline+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <nanotest_putchar@plt>

LLVM IR (-O0):
define void @nanotest_puthline(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = call i32 @nanotest_putchar(i8 signext 10)
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %4
%8 = add i32 %7, -1
store i32 %8, i32* %4
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8, i8* %3
%12 = call i32 @nanotest_putchar(i8 signext %11)
br label %6
13: ; preds = %6
%14 = call i32 @nanotest_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @nanotest_puthline(i8 signext %0, i32 %1) {
%3 = tail call i32 @nanotest_putchar(i8 signext 10)
%4 = icmp eq i32 %1, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %7, %5 ], [ %1, %2 ]
%7 = add i32 %6, -1
%8 = tail call i32 @nanotest_putchar(i8 signext %0)
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = tail call i32 @nanotest_putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void write_lsb_short(short n, FILE *f) {
  unsigned char buf[2];
  buf[0] = n & 0xFF;
  buf[1] = (n >> (1 * 8)) & 0xFF;
  fwrite(buf, 2, 1, f);
}


x86 assembly (clang, -O0):
<write_lsb_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x12(%rbp)
movswl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,-0x11(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_lsb_short>:
push   %rax
mov    %rsi,%rcx
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @write_lsb_short(i16 signext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
%5 = alloca [2 x i8]
store i16 %0, i16* %3
store i32* %1, i32** %4
%6 = load i16, i16* %3
%7 = sext i16 %6 to i32
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i16, i16* %3
%12 = sext i16 %11 to i32
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %15, i8* %16
%17 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%18 = load i32*, i32** %4
%19 = call i32 @fwrite(i8* %17, i32 2, i32 1, i32* %18)
ret void
}

LLVM IR (-O2):
define void @write_lsb_short(i16 signext %0, i32* nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i16 %0 to i8
store i8 %5, i8* %4
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 2, i32 1, i32* %1)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int erro(const char *str) {
  fprintf(stderr, "%s.\n", str);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<erro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erro>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @erro(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @erro(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ makespace(char **, int);
int /*<<< orphan*/ strcatchar(char *, char);
void _xstrcatchar(char **str, char c) {
  makespace(str, 1);
  strcatchar(*str, c);
}


x86 assembly (clang, -O0):
<_xstrcatchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <makespace@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <strcatchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xstrcatchar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <makespace@plt>
mov    (%rbx),%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <strcatchar@plt>

LLVM IR (-O0):
define void @_xstrcatchar(i8** %0, i8 signext %1) {
%3 = alloca i8**
%4 = alloca i8
store i8** %0, i8*** %3
store i8 %1, i8* %4
%5 = load i8**, i8*** %3
%6 = call i32 @makespace(i8** %5, i32 1)
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = load i8, i8* %4
%10 = call i32 @strcatchar(i8* %8, i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @_xstrcatchar(i8** %0, i8 signext %1) {
%3 = tail call i32 @makespace(i8** %0, i32 1)
%4 = load i8*, i8** %0
%5 = tail call i32 @strcatchar(i8* %4, i8 signext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int test(void) {
  char *buffer;
  time_t time;
  buffer = ctime(&time);
  return (buffer != NULL);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* @ctime(i32* %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i8* @ctime(i32* %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Bruce"
         " Lee.\n");
  return EXIT_SUCCESS;
}


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>
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Bruce Lee.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [11 x i8] c"Bruce Lee.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ ReadDecFloat(char const *, scalar_t__, float *);
bool DecodeFloatField(int32_t length, const uint8_t *data, float *f) {
  return ReadDecFloat((const char *)data, length, f) == length;
}


x86 assembly (clang, -O0):
<DecodeFloatField>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <ReadDecFloat@plt>
cmp    -0x8(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DecodeFloatField>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <ReadDecFloat@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @DecodeFloatField(i64 %0, i32* %1, float* %2) {
%4 = alloca i64
%5 = alloca i32*
%6 = alloca float*
store i64 %0, i64* %4
store i32* %1, i32** %5
store float* %2, float** %6
%7 = load i32*, i32** %5
%8 = bitcast i32* %7 to i8*
%9 = load i64, i64* %4
%10 = load float*, float** %6
%11 = call i64 @ReadDecFloat(i8* %8, i64 %9, float* %10)
%12 = load i64, i64* %4
%13 = icmp eq i64 %11, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @DecodeFloatField(i64 %0, i32* %1, float* %2) {
%4 = bitcast i32* %1 to i8*
%5 = tail call i64 @ReadDecFloat(i8* %4, i64 %0, float* %2)
%6 = icmp eq i64 %5, %0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int mn(int, int);
int min(int x, int y, int z) { return mn(x, mn(y, z)); }


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

x86 assembly (clang, -O2):
<min>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %edx,%esi
call   1030 <mn@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <mn@plt>

LLVM IR (-O0):
define i32 @min(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 @mn(i32 %8, i32 %9)
%11 = call i32 @mn(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mn(i32 %1, i32 %2)
%5 = tail call i32 @mn(i32 %0, i32 %4)
ret i32 %5
}