#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int check_64bit(const char *arg, int *x86_32) {
  if ((strcmp(arg, "64bit") == 0) || (strcmp(arg, "x64") == 0))
    *x86_32 = 0;
  else if ((strcmp(arg, "32bit") == 0) || (strcmp(arg, "Win32") == 0))
    *x86_32 = 1;
  else
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<check_64bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1154 <check_64bit+0x44>
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1163 <check_64bit+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
jmp    11b7 <check_64bit+0xa7>
mov    -0x10(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1197 <check_64bit+0x87>
mov    -0x10(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11a6 <check_64bit+0x96>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    11b2 <check_64bit+0xa2>
movl   $0x0,-0x4(%rbp)
jmp    11be <check_64bit+0xae>
jmp    11b7 <check_64bit+0xa7>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_64bit>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1173 <check_64bit+0x63>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1173 <check_64bit+0x63>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     1173 <check_64bit+0x63>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    117b <check_64bit+0x6b>
mov    %ebp,(%r14)
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"64bit\00"
@.str.1 = [4 x i8] c"x64\00"
@.str.2 = [6 x i8] c"32bit\00"
@.str.3 = [6 x i8] c"Win32\00"
define i32 @check_64bit(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9, %2
%14 = load i32*, i32** %5
store i32 0, i32* %14
br label %27
15: ; preds = %9
%16 = load i8*, i8** %4
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8*, i8** %4
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19, %15
%24 = load i32*, i32** %5
store i32 1, i32* %24
br label %26
25: ; preds = %19
store i32 0, i32* %3
br label %28
26: ; preds = %23
br label %27
27: ; preds = %26, %13
store i32 1, i32* %3
br label %28
28: ; preds = %27, %25
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@.str = [6 x i8] c"64bit\00"
@.str.1 = [4 x i8] c"x64\00"
@.str.2 = [6 x i8] c"32bit\00"
@.str.3 = [6 x i8] c"Win32\00"
define i32 @check_64bit(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8, %11, %2, %5
%15 = phi i32 [ 0, %5 ], [ 0, %2 ], [ 1, %11 ], [ 1, %8 ]
store i32 %15, i32* %1
br label %16
16: ; preds = %11, %14
%17 = phi i32 [ 1, %14 ], [ 0, %11 ]
ret i32 %17
}