#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 */
struct wcfxs {
  int dummy;
};

/* Variables and functions */
int init_GSM(struct wcfxs *, int);
int init_SC16IS750(struct wcfxs *, int);
int /*<<< orphan*/ init_WM8510(struct wcfxs *, int);
int Initialize_GSM_module(struct wcfxs *wc, int port) {
  int ret;
  ret = init_SC16IS750(wc, port);
  if (ret)
    return 1;
  init_WM8510(wc, port);
  ret = init_GSM(wc, port);
  if (ret)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Initialize_GSM_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <init_SC16IS750@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1164 <Initialize_GSM_module+0x34>
movl   $0x1,-0x4(%rbp)
jmp    119c <Initialize_GSM_module+0x6c>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <init_WM8510@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <init_GSM@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1195 <Initialize_GSM_module+0x65>
movl   $0x1,-0x4(%rbp)
jmp    119c <Initialize_GSM_module+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize_GSM_module>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <init_SC16IS750@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
jne    1165 <Initialize_GSM_module+0x35>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <init_WM8510@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <init_GSM@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.wcfxs = type { i32 }
define i32 @Initialize_GSM_module(%struct.wcfxs* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.wcfxs*
%5 = alloca i32
%6 = alloca i32
store %struct.wcfxs* %0, %struct.wcfxs** %4
store i32 %1, i32* %5
%7 = load %struct.wcfxs*, %struct.wcfxs** %4
%8 = load i32, i32* %5
%9 = call i32 @init_SC16IS750(%struct.wcfxs* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %24
13: ; preds = %2
%14 = load %struct.wcfxs*, %struct.wcfxs** %4
%15 = load i32, i32* %5
%16 = call i32 @init_WM8510(%struct.wcfxs* %14, i32 %15)
%17 = load %struct.wcfxs*, %struct.wcfxs** %4
%18 = load i32, i32* %5
%19 = call i32 @init_GSM(%struct.wcfxs* %17, i32 %18)
store i32 %19, i32* %6
%20 = load i32, i32* %6
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %13
store i32 1, i32* %3
br label %24
23: ; preds = %13
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %12
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
%struct.wcfxs = type { i32 }
define i32 @Initialize_GSM_module(%struct.wcfxs* %0, i32 %1) {
%3 = tail call i32 @init_SC16IS750(%struct.wcfxs* %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = tail call i32 @init_WM8510(%struct.wcfxs* %0, i32 %1)
%7 = tail call i32 @init_GSM(%struct.wcfxs* %0, i32 %1)
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %2
%11 = phi i32 [ 1, %2 ], [ %9, %5 ]
ret i32 %11
}