xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ tx_writeb(unsigned short);
int tx_writes(unsigned short val) {
  return (tx_writeb(val & 0xFF) == 0 && tx_writeb(val >> 8) == 0) ? 0 : -7;
}


x86 assembly (clang, -O0):
<tx_writes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
movzwl %ax,%edi
call   1030 <tx_writeb@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x3(%rbp)
jne    115b <tx_writes+0x4b>
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
movzwl %ax,%edi
call   1030 <tx_writeb@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%dl
mov    $0xfffffff9,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_writes>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <tx_writeb@plt>
mov    %rax,%rcx
mov    $0xfffffff9,%eax
test   %rcx,%rcx
je     112a <tx_writes+0x1a>
pop    %rbx
ret
movzwl %bx,%edi
shr    $0x8,%edi
call   1030 <tx_writeb@plt>
xor    %ecx,%ecx
test   %rax,%rax
mov    $0xfffffff9,%eax
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tx_writes(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i16
%7 = call i64 @tx_writeb(i16 zeroext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i16, i16* %2
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
%13 = trunc i32 %12 to i16
%14 = call i64 @tx_writeb(i16 zeroext %13)
%15 = icmp eq i64 %14, 0
br label %16
16: ; preds = %9, %1
%17 = phi i1 [ false, %1 ], [ %15, %9 ]
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 -7
ret i32 %19
}

LLVM IR (-O2):
define i32 @tx_writes(i16 zeroext %0) {
%2 = and i16 %0, 255
%3 = tail call i64 @tx_writeb(i16 zeroext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = lshr i16 %0, 8
%7 = tail call i64 @tx_writeb(i16 zeroext %6)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i32 0, i32 -7
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ -7, %1 ], [ %9, %5 ]
ret i32 %11
}
/* Type definitions */
struct msm_camera_i2c_client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ov8858_eos_update_otp_lenc();
int /*<<< orphan*/ ov8858_eos_update_otp_wb();
void ov8858_eos_OTP_all_calibration(struct msm_camera_i2c_client *i2c_client) {
  ov8858_eos_update_otp_wb();
  ov8858_eos_update_otp_lenc();
}


x86 assembly (clang, -O0):
<ov8858_eos_OTP_all_calibration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ov8858_eos_update_otp_wb@plt>
mov    $0x0,%al
call   1040 <ov8858_eos_update_otp_lenc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ov8858_eos_OTP_all_calibration>:
push   %rax
xor    %eax,%eax
call   1030 <ov8858_eos_update_otp_wb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ov8858_eos_update_otp_lenc@plt>

LLVM IR (-O0):
%struct.msm_camera_i2c_client = type { i32 }
define void @ov8858_eos_OTP_all_calibration(%struct.msm_camera_i2c_client* %0) {
%2 = alloca %struct.msm_camera_i2c_client*
store %struct.msm_camera_i2c_client* %0, %struct.msm_camera_i2c_client** %2
%3 = call i32 (...) @ov8858_eos_update_otp_wb()
%4 = call i32 (...) @ov8858_eos_update_otp_lenc()
ret void
}

LLVM IR (-O2):
%struct.msm_camera_i2c_client = type { i32 }
define void @ov8858_eos_OTP_all_calibration(%struct.msm_camera_i2c_client* nocapture readnone %0) {
%2 = tail call i32 (...) @ov8858_eos_update_otp_wb()
%3 = tail call i32 (...) @ov8858_eos_update_otp_lenc()
ret void
}
void ROM_SysTickIntEnable() {}


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

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

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

LLVM IR (-O2):
define void @ROM_SysTickIntEnable() {
ret void
}
void I422ToRGB565Row_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGB565Row_AVX2() {
ret void
}
void sgIP_memblock_Init() {}


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

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

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

LLVM IR (-O2):
define void @sgIP_memblock_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ SSIBaseValid(unsigned long);
unsigned long SSIClockSourceGet(unsigned long ulBase) {
  DEBUG_ASSERT(SSIBaseValid(ulBase));
  return ((*((volatile unsigned long *)(ulBase + 0x00000FC8))));
}


x86 assembly (clang, -O0):
<SSIClockSourceGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0xfc8(%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIClockSourceGet>:
push   %rbx
mov    %rdi,%rbx
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    0xfc8(%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @SSIClockSourceGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @SSIBaseValid(i64 %3)
%5 = call i32 @DEBUG_ASSERT(i32 %4)
%6 = load i64, i64* %2
%7 = add i64 %6, 4040
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @SSIClockSourceGet(i64 %0) {
%2 = tail call i32 @SSIBaseValid(i64 %0)
%3 = tail call i32 @DEBUG_ASSERT(i32 %2)
%4 = add i64 %0, 4040
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
void XtAppAddInput() {}


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

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

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

LLVM IR (-O2):
define void @XtAppAddInput() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void EMACRxDisable(uint32_t ui32Base) {
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) &= ~0x00000004;
  (*((volatile uint32_t *)(ui32Base + 0x00000C18))) &= ~0x00000002;
}


x86 assembly (clang, -O0):
<EMACRxDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffb,%ecx
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0xc18,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffd,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACRxDisable>:
movslq %edi,%rax
andl   $0xfffffffb,(%rax)
andl   $0xfffffffd,0xc18(%rax)
ret

LLVM IR (-O0):
define void @EMACRxDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -5
store volatile i32 %8, i32* %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 3096
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to i32*
%13 = load volatile i32, i32* %12
%14 = and i32 %13, -3
store volatile i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @EMACRxDisable(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = and i32 %4, -5
store volatile i32 %5, i32* %3
%6 = add nsw i32 %0, 3096
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -3
store volatile i32 %10, i32* %8
ret void
}
/* Variables and functions */
int f_getfd();
int main() { return f_getfd(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f_getfd@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f_getfd()
ret i32 %2
}

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

/* Variables and functions */
int /*<<< orphan*/ pci_find_class(int, int /*<<< orphan*/, int /*<<< orphan*/);
uint16_t pci_find_classcode(uint32_t dev_class) {
  return pci_find_class((0xb1 << 8) | 0x03, dev_class, 0);
}


x86 assembly (clang, -O0):
<pci_find_classcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xb103,%edi
xor    %edx,%edx
call   1030 <pci_find_class@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_find_classcode>:
mov    %edi,%esi
mov    $0xb103,%edi
xor    %edx,%edx
jmp    1030 <pci_find_class@plt>

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

LLVM IR (-O2):
define i32 @pci_find_classcode(i32 %0) {
%2 = tail call i32 @pci_find_class(i32 45315, i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int);
scalar_t__ malloc(int);
scalar_t__ nondet();
int main() {
  int *r;
  int z;
  r = (int *)malloc(4);
  *r = 0;
  csolve_assert(*r == 0);
  if (nondet()) {
    z = 0;
  }
  *r = 1;
  csolve_assert(*r == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <csolve_assert@plt>
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     1183 <main+0x53>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <csolve_assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
mov    $0x1,%edi
call   1050 <csolve_assert@plt>
xor    %eax,%eax
call   1030 <nondet@plt>
movl   $0x1,(%rbx)
mov    $0x1,%edi
call   1050 <csolve_assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 0, i32* %6
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @csolve_assert(i32 %10)
%12 = call i64 (...) @nondet()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %0
store i32 0, i32* %3
br label %15
15: ; preds = %14, %0
%16 = load i32*, i32** %2
store i32 1, i32* %16
%17 = load i32*, i32** %2
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 1
%20 = zext i1 %19 to i32
%21 = call i32 @csolve_assert(i32 %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
%3 = tail call i32 @csolve_assert(i32 1)
%4 = tail call i64 (...) @nondet()
store i32 1, i32* %2
%5 = tail call i32 @csolve_assert(i32 1)
ret i32 0
}
/* Variables and functions */
double log(int);
double log2d(double x) { return log(x) / log(2); }


x86 assembly (clang, -O0):
<log2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%edi
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
mov    $0x2,%edi
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2d>:
push   %rax
cvttsd2si %xmm0,%edi
call   1030 <log@plt>
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1030 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log2d(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = call double @log(i32 %4)
%6 = call double @log(i32 2)
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @log2d(double %0) {
%2 = fptosi double %0 to i32
%3 = tail call double @log(i32 %2)
%4 = tail call double @log(i32 2)
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_set_release_callback() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_set_release_callback"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"NOT IMPLEMENTED:pa_pstream_set_release_callback\0A\00"
define i32 @pa_pstream_set_release_callback() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [48 x i8] c"NOT IMPLEMENTED:pa_pstream_set_release_callback\00"
define i32 @pa_pstream_set_release_callback() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
void printPoint(double x, double y) { printf("(%f, %f)", x, y); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"(%f, %f)\00"
define void @printPoint(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret void
}
int notification_backend_init(const char **error) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @notification_backend_init(i8** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gpio_keys_close();
int /*<<< orphan*/ pmic_keys_close();
int /*<<< orphan*/ qfprintf(char *, char *);
int /*<<< orphan*/ ts_close();
void input_close(void) {
  ts_close();
  gpio_keys_close();
  pmic_keys_close();
  qfprintf("/sys/devices/platform/cy8ctma395/vdd", "0");
}


x86 assembly (clang, -O0):
<input_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <ts_close@plt>
mov    $0x0,%al
call   1030 <gpio_keys_close@plt>
mov    $0x0,%al
call   1050 <pmic_keys_close@plt>
lea    0xea0(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1040 <qfprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_close>:
push   %rax
xor    %eax,%eax
call   1060 <ts_close@plt>
xor    %eax,%eax
call   1030 <gpio_keys_close@plt>
xor    %eax,%eax
call   1050 <pmic_keys_close@plt>
lea    0xea3(%rip),%rdi
lea    0xec1(%rip),%rsi
pop    %rax
jmp    1040 <qfprintf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"/sys/devices/platform/cy8ctma395/vdd\00"
@.str.1 = [2 x i8] c"0\00"
define void @input_close() {
%1 = call i32 (...) @ts_close()
%2 = call i32 (...) @gpio_keys_close()
%3 = call i32 (...) @pmic_keys_close()
%4 = call i32 @qfprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"/sys/devices/platform/cy8ctma395/vdd\00"
@.str.1 = [2 x i8] c"0\00"
define void @input_close() {
%1 = tail call i32 (...) @ts_close()
%2 = tail call i32 (...) @gpio_keys_close()
%3 = tail call i32 (...) @pmic_keys_close()
%4 = tail call i32 @qfprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall_unlink(char *);
int unlink(char *name) { return syscall_unlink(name); }


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

x86 assembly (clang, -O2):
<unlink>:
jmp    1030 <syscall_unlink@plt>

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

LLVM IR (-O2):
define i32 @unlink(i8* %0) {
%2 = tail call i32 @syscall_unlink(i8* %0)
ret i32 %2
}
char *GetWORD(char *sensekey) {
  static char word[100];
  int i = 0;
  while ((word[i++] = *sensekey++) != '%')
    ;
  word[i - 1] = '\0';
  return (word);
}


x86 assembly (clang, -O0):
<GetWORD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rdx
lea    0x2efb(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x25,%eax
je     1149 <GetWORD+0x49>
jmp    110f <GetWORD+0xf>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2ed7(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2ecc(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetWORD>:
xor    %ecx,%ecx
lea    0x2f27(%rip),%rax
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%edx
mov    %dl,(%rcx,%rax,1)
add    $0x1,%rcx
cmp    $0x25,%dl
jne    1110 <GetWORD+0x10>
add    $0xffffffff,%ecx
movb   $0x0,(%rcx,%rax,1)
ret

LLVM IR (-O0):
@GetWORD.word = internal global [100 x i8] zeroinitializer
define i8* @GetWORD(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = sext i32 %8 to i64
%11 = getelementptr inbounds [100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 %10
store i8 %7, i8* %11
%12 = sext i8 %7 to i32
%13 = icmp ne i32 %12, 37
br i1 %13, label %14, label %15
14: ; preds = %4
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = sub nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 %18
store i8 0, i8* %19
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 0)
}

LLVM IR (-O2):
@GetWORD.word = internal global [100 x i8] zeroinitializer
define i8* @GetWORD(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = phi i8* [ %5, %2 ], [ %0, %1 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = add nuw i64 %3, 1
%8 = getelementptr inbounds [100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 %3
store i8 %6, i8* %8
%9 = icmp eq i8 %6, 37
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = and i64 %3, 4294967295
%12 = getelementptr inbounds [100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 %11
store i8 0, i8* %12
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @GetWORD.word, i64 0, i64 0)
}
void nseel_asm_dbg_getstackptr_end(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __list_splice(struct elist_head *, struct elist_head *);
int /*<<< orphan*/ elist_empty(struct elist_head *);
void list_splice(struct elist_head *list, struct elist_head *head) {
  if (!elist_empty(list))
    __list_splice(list, head);
}


x86 assembly (clang, -O0):
<list_splice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <elist_empty@plt>
cmp    $0x0,%eax
jne    114f <list_splice+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__list_splice@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <elist_empty@plt>
test   %eax,%eax
je     113b <list_splice+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__list_splice@plt>

LLVM IR (-O0):
%struct.elist_head = type { i32 }
define void @list_splice(%struct.elist_head* %0, %struct.elist_head* %1) {
%3 = alloca %struct.elist_head*
%4 = alloca %struct.elist_head*
store %struct.elist_head* %0, %struct.elist_head** %3
store %struct.elist_head* %1, %struct.elist_head** %4
%5 = load %struct.elist_head*, %struct.elist_head** %3
%6 = call i32 @elist_empty(%struct.elist_head* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load %struct.elist_head*, %struct.elist_head** %3
%10 = load %struct.elist_head*, %struct.elist_head** %4
%11 = call i32 @__list_splice(%struct.elist_head* %9, %struct.elist_head* %10)
br label %12
12: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.elist_head = type { i32 }
define void @list_splice(%struct.elist_head* %0, %struct.elist_head* %1) {
%3 = tail call i32 @elist_empty(%struct.elist_head* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @__list_splice(%struct.elist_head* %0, %struct.elist_head* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int test_close_write_helper(char *path, void *fdptr) {
  int fd = *(int *)fdptr;
  (void)close(fd);
  return 0;
}


x86 assembly (clang, -O0):
<test_close_write_helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_close_write_helper>:
push   %rax
mov    (%rsi),%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_close_write_helper(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @close(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @test_close_write_helper(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @close(i32 %4)
ret i32 0
}
/* Type definitions */
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ part;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char const *, struct tm *);
void print_time(const char *format, struct tm *current_tm) {
  static char part[512];
  if (current_tm == NULL) {
    return;
  }
  (void)strftime(part, sizeof(part), format, current_tm);
  printf("%s", part);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1140 <print_time+0x20>
jmp    116c <print_time+0x4c>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0x2ef1(%rip),%rdi
mov    $0x200,%esi
call   1040 <strftime@plt>
lea    0xea0(%rip),%rdi
lea    0x2ed9(%rip),%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
test   %rsi,%rsi
je     1150 <print_time+0x30>
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0x2f0d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1040 <strftime@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@print_time.part = internal global [512 x i8] zeroinitializer
@.str = [3 x i8] c"%s\00"
define void @print_time(i8* %0, %struct.tm* %1) {
%3 = alloca i8*
%4 = alloca %struct.tm*
store i8* %0, i8** %3
store %struct.tm* %1, %struct.tm** %4
%5 = load %struct.tm*, %struct.tm** %4
%6 = icmp eq %struct.tm* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %13
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load %struct.tm*, %struct.tm** %4
%11 = call i32 @strftime(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @print_time.part, i64 0, i64 0), i32 512, i8* %9, %struct.tm* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([512 x i8], [512 x i8]* @print_time.part, i64 0, i64 0))
br label %13
13: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@print_time.part = internal global [512 x i8] zeroinitializer
@.str = [3 x i8] c"%s\00"
define void @print_time(i8* %0, %struct.tm* %1) {
%3 = icmp eq %struct.tm* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @strftime(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @print_time.part, i64 0, i64 0), i32 512, i8* %0, %struct.tm* %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([512 x i8], [512 x i8]* @print_time.part, i64 0, i64 0))
br label %7
7: ; preds = %2, %4
ret void
}
/* Variables and functions */
unsigned char EP94M3_I2C_Reg_Wr(unsigned char, unsigned char *, unsigned int);
unsigned char EP94M0_Reg_Write(unsigned char RegAddr, unsigned char *Data,
                               unsigned int Size) {
  return EP94M3_I2C_Reg_Wr(RegAddr, Data, Size);
}


x86 assembly (clang, -O0):
<EP94M0_Reg_Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movzbl %al,%edi
call   1030 <EP94M3_I2C_Reg_Wr@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EP94M0_Reg_Write>:
jmp    1030 <EP94M3_I2C_Reg_Wr@plt>

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

LLVM IR (-O2):
define zeroext i8 @EP94M0_Reg_Write(i8 zeroext %0, i8* %1, i32 %2) {
%4 = tail call zeroext i8 @EP94M3_I2C_Reg_Wr(i8 zeroext %0, i8* %1, i32 %2)
ret i8 %4
}
/* Variables and functions */
int assert(int);
int foo() {
  assert(1 ? 1 : 0) == 1;
  assert(0 ? 1 : 0) == 0;
  assert(1 ? 1 : 0 ? 2 : 3) == 1;
  assert(0 ? 1 : 1 ? 2 : 3) == 2;
  assert(0 ? 1 : 0 ? 2 : 3) == 3;
  assert(0 ? 1 : 0 ? 2 : 0 ? 3 : 0 ? 4 : 0 ? 5 : 6) == 6;
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x2,%edi
call   1030 <assert@plt>
mov    $0x3,%edi
call   1030 <assert@plt>
mov    $0x6,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x2,%edi
call   1030 <assert@plt>
mov    $0x3,%edi
call   1030 <assert@plt>
mov    $0x6,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 @assert(i32 1)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 0)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 1)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 2)
%11 = icmp eq i32 %10, 2
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 3)
%14 = icmp eq i32 %13, 3
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 6)
%17 = icmp eq i32 %16, 6
%18 = zext i1 %17 to i32
ret i32 0
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 0)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 2)
%5 = tail call i32 @assert(i32 3)
%6 = tail call i32 @assert(i32 6)
ret i32 0
}
/* Type definitions */
struct list_elem {
  int dummy;
};
struct list {
  int dummy;
};

/* Variables and functions */
struct list_elem *list_back(struct list *);
struct list_elem *list_tail(struct list *list) {
  return list_back(list);
}


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

x86 assembly (clang, -O2):
<list_tail>:
jmp    1030 <list_back@plt>

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

LLVM IR (-O2):
%struct.list_elem = type { i32 }
%struct.list = type { i32 }
define %struct.list_elem* @list_tail(%struct.list* %0) {
%2 = tail call %struct.list_elem* @list_back(%struct.list* %0)
ret %struct.list_elem* %2
}
int Loca(char *orgStr, char c) {
  for (int i = 0; orgStr[i] != 0; i++) {
    if (orgStr[i] == c) {
      return i;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<Loca>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1160 <Loca+0x60>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114d <Loca+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <Loca+0x67>
jmp    1152 <Loca+0x52>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <Loca+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Loca>:
mov    (%rdi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <Loca+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %sil,%dl
je     1123 <Loca+0x23>
movzbl 0x1(%rdi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <Loca+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @Loca(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %1
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_interleave() {
  printf("NOT IMPLEMENTED:"
         "pa_interleave"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"NOT IMPLEMENTED:pa_interleave\0A\00"
define i32 @pa_interleave() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_interleave\00"
define i32 @pa_interleave() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ glp_lib_insist(char *, char *, int);
int strcmp(char *, char *);
int glp_avl_strcmp(void *info, void *key1, void *key2) {
  ((void)((info == info) ||
          (glp_lib_insist(
               "info == info",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/ecotox/pacfm/refs/heads/"
               "master/pacfm/tools/minpath-1.2/glpk-4.6/src/glpavl.c",
               112),
           1)));
  return strcmp((char *)key1, (char *)key2);
}


x86 assembly (clang, -O0):
<glp_avl_strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
je     1164 <glp_avl_strcmp+0x44>
lea    0xeb2(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x70,%edx
call   1040 <glp_lib_insist@plt>
mov    $0x1,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glp_avl_strcmp>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"info == info\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ecotox/pacfm/refs/heads/master/pacfm/tools/minpath-1.2/glpk-4.6/src/glpavl.c\00"
define i32 @glp_avl_strcmp(i8* %0, i8* %1, i8* %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** %4
%8 = load i8*, i8** %4
%9 = icmp eq i8* %7, %8
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @glp_lib_insist(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0), i32 112)
br label %12
12: ; preds = %10, %3
%13 = phi i1 [ true, %3 ], [ true, %10 ]
%14 = zext i1 %13 to i32
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i32 @strcmp(i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @glp_avl_strcmp(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %2)
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
bool file_exists(const char *file) {
  struct stat buf;
  return stat(file, &buf) == 0;
}


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char const *roadmap_path_user();
const char *roadmap_log_path() { return (roadmap_path_user()); }


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

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

LLVM IR (-O0):
define i8* @roadmap_log_path() {
%1 = call i8* (...) @roadmap_path_user()
ret i8* %1
}

LLVM IR (-O2):
define i8* @roadmap_log_path() {
%1 = tail call i8* (...) @roadmap_path_user()
ret i8* %1
}
/* Variables and functions */
int access(char const *, int);
int errno;
int __sulong_posix_access(const char *path, int amode) {
  {
    int native_errno = errno;
    int result = access(path, amode);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <access@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1154 <__sulong_posix_access+0x44>
xor    %eax,%eax
mov    0x2e93(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%ecx
mov    0x2e82(%rip),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_access>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <access@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__sulong_posix_access(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* @errno
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @access(i8* %8, i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = sub nsw i32 0, %14
%16 = sext i32 %15 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %13, %2
%19 = load i32, i32* %5
store i32 %19, i32* @errno
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__sulong_posix_access(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @access(i8* %0, i32 %1)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 %4
store i32 %3, i32* @errno
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ perrfp(int /*<<< orphan*/, char const *, int);
int /*<<< orphan*/ stderr;
void perr(const char *str, int be_errno) { perrfp(stderr, str, be_errno); }


x86 assembly (clang, -O0):
<perr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <perrfp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perr>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <perrfp@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @perr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @perrfp(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @perr(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @perrfp(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
char *str_chr(char const *);
int strlen(char const *);
short is_comment_(const char *s) {
  char *p;
  if (!s || strlen(s) < 1) {
    return 0;
  }
  p = str_chr(s);
  if (p != NULL && *p == '#') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_comment_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1149 <is_comment_+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jge    1154 <is_comment_+0x34>
movw   $0x0,-0x2(%rbp)
jmp    118d <is_comment_+0x6d>
mov    -0x10(%rbp),%rdi
call   1040 <str_chr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1187 <is_comment_+0x67>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1187 <is_comment_+0x67>
movw   $0x1,-0x2(%rbp)
jmp    118d <is_comment_+0x6d>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_comment_>:
push   %rbx
test   %rdi,%rdi
je     114b <is_comment_+0x2b>
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    114b <is_comment_+0x2b>
mov    %rbx,%rdi
call   1040 <str_chr@plt>
test   %rax,%rax
je     114b <is_comment_+0x2b>
mov    %rax,%rcx
mov    $0x1,%ax
cmpb   $0x23,(%rcx)
je     114d <is_comment_+0x2d>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @is_comment_(i8* %0) {
%2 = alloca i16
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i16 0, i16* %2
br label %24
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = call i8* @str_chr(i8* %13)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %23
17: ; preds = %12
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 35
br i1 %21, label %22, label %23
22: ; preds = %17
store i16 1, i16* %2
br label %24
23: ; preds = %17, %12
store i16 0, i16* %2
br label %24
24: ; preds = %23, %22, %11
%25 = load i16, i16* %2
ret i16 %25
}

LLVM IR (-O2):
define signext i16 @is_comment_(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp slt i32 %4, 1
br i1 %5, label %13, label %6
6: ; preds = %3
%7 = tail call i8* @str_chr(i8* %0)
%8 = icmp eq i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 35
br i1 %11, label %13, label %12
12: ; preds = %9, %6
br label %13
13: ; preds = %9, %1, %3, %12
%14 = phi i16 [ 0, %12 ], [ 0, %3 ], [ 0, %1 ], [ 1, %9 ]
ret i16 %14
}
/* Variables and functions */
int /*<<< orphan*/ activate_help(char *);
int /*<<< orphan*/ select_pause();
void pause_handler(int x, int y, int button) {
  if (button == 3) {
    activate_help("pause.hlp");
  } else {
    select_pause();
  }
}


x86 assembly (clang, -O0):
<pause_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jne    114c <pause_handler+0x2c>
lea    0xebe(%rip),%rdi
call   1040 <activate_help@plt>
jmp    1153 <pause_handler+0x33>
mov    $0x0,%al
call   1030 <select_pause@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_handler>:
cmp    $0x3,%edx
jne    1131 <pause_handler+0x11>
lea    0xed4(%rip),%rdi
jmp    1040 <activate_help@plt>
xor    %eax,%eax
jmp    1030 <select_pause@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"pause.hlp\00"
define void @pause_handler(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* %6
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 @activate_help(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %3
%12 = call i32 (...) @select_pause()
br label %13
13: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"pause.hlp\00"
define void @pause_handler(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 3
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @activate_help(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %3
%8 = tail call i32 (...) @select_pause()
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int encode_decode_lib(char *, char *, int, char **);
int main(int argc, char **argv) {
  return encode_decode_lib("qp", "encode", argc, argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecc(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1030 <encode_decode_lib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %rsi,%rcx
mov    %edi,%edx
lea    0xee4(%rip),%rdi
lea    0xee0(%rip),%rsi
jmp    1030 <encode_decode_lib@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"qp\00"
@.str.1 = [7 x i8] c"encode\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @encode_decode_lib(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int strlen(char *);
int keta(char *str) {
  int len = 0;
  len = strlen(str);
  return len;
}


x86 assembly (clang, -O0):
<keta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keta>:
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @keta(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @keta(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void end_windows(void) { endwin(); }


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

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

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

LLVM IR (-O2):
define void @end_windows() {
%1 = tail call i32 (...) @endwin()
ret void
}